mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
ReaderRolling: fix possible crash in scroll mode
When opening a document in scroll mode with an invalid
last_xpointer.
This code path was never taken before 05126b94, and it has
never been updated to pass the page number in scroll mode
(so it's provided to the footer) like it has been in other
places.
This commit is contained in:
@@ -891,7 +891,7 @@ function ReaderRolling:onRedrawCurrentView()
|
||||
if self.view.view_mode == "page" then
|
||||
self.ui:handleEvent(Event:new("PageUpdate", self.current_page))
|
||||
else
|
||||
self.ui:handleEvent(Event:new("PosUpdate", self.current_pos))
|
||||
self.ui:handleEvent(Event:new("PosUpdate", self.current_pos, self.ui.document:getCurrentPage()))
|
||||
end
|
||||
return true
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user