mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
ReaderFooter: fix minor issues with pages left & chapter progress
When using Reference page numbers, "Pages left" was showing the same info as "Current page", because Reference pages, being strings, couldn't be used for arithmetics. But we can just count the number of items left in the Reference pages array of strings. Also fix edge case with "page progress" with hidden flow when we are before the first chapter with a hidden flow before.
This commit is contained in:
@@ -280,8 +280,11 @@ function ReaderPageMap:getCurrentPageLabel(clean_label)
|
||||
-- For consistency, getPageMapCurrentPageLabel() returns the last page
|
||||
-- label shown in the view if there are more than one (or the previous
|
||||
-- one if there is none).
|
||||
local label = self.ui.document:getPageMapCurrentPageLabel()
|
||||
return clean_label and self:cleanPageLabel(label) or label
|
||||
local label, idx, count = self.ui.document:getPageMapCurrentPageLabel()
|
||||
if clean_label then
|
||||
label = self:cleanPageLabel(label)
|
||||
end
|
||||
return label, idx, count
|
||||
end
|
||||
|
||||
function ReaderPageMap:getFirstPageLabel(clean_label)
|
||||
|
||||
Reference in New Issue
Block a user