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.
pull/7253/head
poire-z 3 years ago
parent 6f50d67b5d
commit 316107a1cb

@ -891,7 +891,7 @@ function ReaderRolling:onRedrawCurrentView()
if self.view.view_mode == "page" then if self.view.view_mode == "page" then
self.ui:handleEvent(Event:new("PageUpdate", self.current_page)) self.ui:handleEvent(Event:new("PageUpdate", self.current_page))
else else
self.ui:handleEvent(Event:new("PosUpdate", self.current_pos)) self.ui:handleEvent(Event:new("PosUpdate", self.current_pos, self.ui.document:getCurrentPage()))
end end
return true return true
end end

Loading…
Cancel
Save