Skip to content

Commit

Permalink
add config property show_last_review
Browse files Browse the repository at this point in the history
  • Loading branch information
tatsumoto-ren committed Sep 18, 2024
1 parent 77a861c commit bf78f48
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions config.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"])
Expand Down
2 changes: 1 addition & 1 deletion top_toolbar.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit bf78f48

Please # to comment.