Skip to content

Commit ee3501f

Browse files
committed
Fix: Add Book.current_page for screen compatibility
1 parent 1c45c49 commit ee3501f

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

encyclopaedia/book/book_ren.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,11 @@ def active(self) -> 'EncEntry':
147147
"""Get the page that's currently being viewed."""
148148
return self.pages[self._unlocked_page_index]
149149

150+
@property
151+
def current_page(self) -> 'EncEntry':
152+
"""Alias for active. Used by screens."""
153+
return self.active
154+
150155
@property
151156
def percentage_unlocked(self) -> float:
152157
"""Get the percentage of the Book that's unlocked.

0 commit comments

Comments
 (0)