Skip to content

Commit

Permalink
Fix: Add Book.current_page for screen compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
jsfehler committed Oct 11, 2024
1 parent 1c45c49 commit ee3501f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions encyclopaedia/book/book_ren.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,11 @@ def active(self) -> 'EncEntry':
"""Get the page that's currently being viewed."""
return self.pages[self._unlocked_page_index]

@property
def current_page(self) -> 'EncEntry':
"""Alias for active. Used by screens."""
return self.active

@property
def percentage_unlocked(self) -> float:
"""Get the percentage of the Book that's unlocked.
Expand Down

0 comments on commit ee3501f

Please sign in to comment.