feat: show whole-book reading progress percentage in status bar#108
Open
AnnTreenite wants to merge 1 commit intobigbag:mainfrom
Open
feat: show whole-book reading progress percentage in status bar#108AnnTreenite wants to merge 1 commit intobigbag:mainfrom
AnnTreenite wants to merge 1 commit intobigbag:mainfrom
Conversation
Replace the per-chapter page counter in the status bar with a whole-book reading progress percentage (e.g. 87.3%) shown at bottom-right. For EPUB, each spine section has its own page cache. Page counts are accumulated in a lightweight index file (spine_pages.bin) stored alongside the section caches. The index is loaded at book-open and updated in the background whenever a new section is fully cached, so: - First open: shows --.-% until the current section is indexed (~seconds) - Subsequent opens: shows the exact percentage immediately for all previously cached sections For flat formats (TXT, Markdown, FB2, HTML) the percentage is computed directly from the single-section page cache and is always exact. XTC format already has a flat page index and is handled by the flat-format path via currentSectionPage_ / totalPages.
Owner
|
Hey, thanks for the PR! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Replaces the per-chapter page number in the bottom-right of the status bar with a whole-book reading progress percentage (e.g. 87.3%). Progress is calculated from uncompressed byte sizes of each EPUB spine item stored in book.bin - available immediately on first open, no background caching needed. Cache version bumped 6->7 (auto-rebuilt on first open). Approach equivalent to Epub::calculateProgress() from the CrossInk fork, adapted to papyrix-reader architecture.