From c606724eb43795066656650220e1a5a27e69016e Mon Sep 17 00:00:00 2001 From: Jarrett Ye Date: Sun, 21 Apr 2024 13:55:55 +0800 Subject: [PATCH] rename auto_disperse to auto_disperse_when_review --- __init__.py | 4 ++-- config.json | 2 +- configuration.py | 12 ++++++------ schedule/disperse_siblings.py | 2 +- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/__init__.py b/__init__.py index 657c2f4..b4cfb92 100644 --- a/__init__.py +++ b/__init__.py @@ -89,7 +89,7 @@ def set_auto_disperse_after_sync(checked, _): def set_auto_disperse_when_review(checked, _): - config.auto_disperse = checked + config.auto_disperse_when_review = checked menu_auto_disperse = checkable( @@ -228,7 +228,7 @@ def adjust_menu(): ) menu_auto_reschedule_after_sync.setChecked(config.auto_reschedule_after_sync) menu_auto_disperse_after_sync.setChecked(config.auto_disperse_after_sync) - menu_auto_disperse.setChecked(config.auto_disperse) + menu_auto_disperse.setChecked(config.auto_disperse_when_review) menu_display_memory_state.setChecked(config.display_memory_state) menu_load_balance.setChecked(config.load_balance) menu_for_auto_easy_days.setChecked(config.auto_easy_days) diff --git a/config.json b/config.json index de29f03..be38148 100644 --- a/config.json +++ b/config.json @@ -5,7 +5,7 @@ "days_to_reschedule": 7, "auto_reschedule_after_sync": false, "auto_disperse_after_sync": false, - "auto_disperse": false, + "auto_disperse_when_review": false, "mature_ivl": 21, "debug_notify": false, "fsrs_stats": true, diff --git a/configuration.py b/configuration.py index da7bb31..7e4856e 100644 --- a/configuration.py +++ b/configuration.py @@ -8,7 +8,7 @@ DAYS_TO_RESCHEDULE = "days_to_reschedule" AUTO_RESCHEDULE_AFTER_SYNC = "auto_reschedule_after_sync" AUTO_DISPERSE_AFTER_SYNC = "auto_disperse_after_sync" -AUTO_DISPERSE = "auto_disperse" +AUTO_DISPERSE_WHEN_REVIEW = "auto_disperse_when_review" MATURE_IVL = "mature_ivl" DEBUG_NOTIFY = "debug_notify" FSRS_STATS = "fsrs_stats" @@ -95,12 +95,12 @@ def auto_disperse_after_sync(self, value): self.save() @property - def auto_disperse(self): - return self.data[AUTO_DISPERSE] + def auto_disperse_when_review(self): + return self.data[AUTO_DISPERSE_WHEN_REVIEW] - @auto_disperse.setter - def auto_disperse(self, value): - self.data[AUTO_DISPERSE] = value + @auto_disperse_when_review.setter + def auto_disperse_when_review(self, value): + self.data[AUTO_DISPERSE_WHEN_REVIEW] = value self.save() @property diff --git a/schedule/disperse_siblings.py b/schedule/disperse_siblings.py index 0774e7b..37a240c 100644 --- a/schedule/disperse_siblings.py +++ b/schedule/disperse_siblings.py @@ -210,7 +210,7 @@ def disperse_siblings_when_review(reviewer, card: Card, ease): config = Config() config.load() - if not config.auto_disperse: + if not config.auto_disperse_when_review: return siblings = get_siblings_when_review(card)