mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
add last_percent field in pdf/djvu document history
And normalize last_percent for cre document
This commit is contained in:
@@ -104,7 +104,7 @@ end
|
||||
function ReaderRolling:onCloseDocument()
|
||||
local cur_xp = self.ui.document:getXPointer()
|
||||
self.ui.doc_settings:saveSetting("last_percent",
|
||||
10000 * self.ui.document:getPosFromXPointer(cur_xp) / self.doc_height)
|
||||
self.ui.document:getPosFromXPointer(cur_xp) / self.doc_height)
|
||||
end
|
||||
|
||||
function ReaderRolling:onTapForward()
|
||||
@@ -214,7 +214,7 @@ function ReaderRolling:gotoXPointer(xpointer)
|
||||
end
|
||||
|
||||
function ReaderRolling:gotoPercent(new_percent)
|
||||
self:gotoPos(new_percent * self.doc_height / 10000)
|
||||
self:gotoPos(new_percent * self.doc_height)
|
||||
end
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user