diff --git a/config.py b/config.py index b92ee1c..73109af 100644 --- a/config.py +++ b/config.py @@ -112,6 +112,10 @@ 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_last_review(self) -> bool: + return bool(self["show_last_review"]) + @property def show_reps_done_today(self) -> bool: return bool(self["show_reps_done_today"]) diff --git a/top_toolbar.py b/top_toolbar.py index f83217b..13100bd 100644 --- a/top_toolbar.py +++ b/top_toolbar.py @@ -89,7 +89,7 @@ def append_link(cls, links: list, toolbar: Toolbar) -> None: @classmethod def update(cls, reviewer: Reviewer, card: Card, ease: int) -> None: """Called after a card was answered.""" - if config["show_last_review"] is False: + if config.show_last_review is False: return label = config.get_label(ease, cls._last_default_ease)