From 77a861c9e23f031bb5ff6f7e2173683243ba7207 Mon Sep 17 00:00:00 2001 From: Ren Tatsumoto Date: Wed, 18 Sep 2024 04:22:22 +0300 Subject: [PATCH] add config option show_reps_done_today --- config.json | 1 + config.py | 4 ++++ remaining.py | 2 ++ 3 files changed, 7 insertions(+) diff --git a/config.json b/config.json index f144d77..b8ec364 100644 --- a/config.json +++ b/config.json @@ -27,6 +27,7 @@ "pass_fail": true, "flexible_grading": true, "show_last_review": true, + "show_reps_done_today": true, "set_zoom_shortcuts": true, "remember_zoom_level": true, "tooltip_on_zoom_change": true, diff --git a/config.py b/config.py index 9ba8d15..b92ee1c 100644 --- a/config.py +++ b/config.py @@ -112,5 +112,9 @@ def get_zoom_state(self, state: str) -> float: def set_zoom_state(self, state: str, value: float) -> None: self._config.setdefault("zoom_states", {})[state] = value + @property + def show_reps_done_today(self) -> bool: + return bool(self["show_reps_done_today"]) + config = FlexibleGradingConfig() diff --git a/remaining.py b/remaining.py index 870699b..f8e77a6 100644 --- a/remaining.py +++ b/remaining.py @@ -51,6 +51,8 @@ def studied_today_count(col: Collection) -> int: def format_studied_today(col: Collection) -> str: + if not config.show_reps_done_today: + return "" return f'Reps: {studied_today_count(col)}'