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.
reviewable/pr7253/r1
poire-z 3 years ago
parent 6f50d67b5d
commit 316107a1cb

@ -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

Loading…
Cancel
Save