Status bar: use screen pages for "time left in chapter" (#14651)

This commit is contained in:
hius07
2025-11-23 08:48:47 +02:00
committed by GitHub
parent bf8274d47c
commit e7dc224661
2 changed files with 3 additions and 3 deletions

View File

@@ -327,7 +327,7 @@ footerTextGeneratorMap = {
chapter_time_to_read = function(footer)
local symbol_type = footer.settings.item_prefix
local prefix = symbol_prefix[symbol_type].chapter_time_to_read
local left = footer.ui.toc:getChapterPagesLeft(footer.pageno) or footer.ui.document:getTotalPagesLeft(footer.pageno)
local left = footer.ui.toc:getChapterPagesLeft(footer.pageno, true) or footer.ui.document:getTotalPagesLeft(footer.pageno)
return prefix .. " " ..
(footer.ui.statistics and footer.ui.statistics:getTimeForPages(left) or _("N/A"))
end,

View File

@@ -718,8 +718,8 @@ function ReaderToc:getChapterPageCount(pageno)
return page_count
end
function ReaderToc:getChapterPagesLeft(pageno)
if self.ui.pagemap and self.ui.pagemap:wantsPageLabels() then
function ReaderToc:getChapterPagesLeft(pageno, screen_pages)
if not screen_pages and self.ui.pagemap and self.ui.pagemap:wantsPageLabels() then
local page_idx = self:getPagePagemapIndex(pageno)
if page_idx then
local next_chapter_idx, chapter_starts_new_ref_page = self:getNextChapterPagemapIndex(pageno)