mirror of
https://github.com/koreader/koreader.git
synced 2025-12-13 20:36:53 +01:00
Status bar: use screen pages for "time left in chapter" (#14651)
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user