mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
Merge pull request #812 from chrox/flip_fix
bugfix: remove original page number after leaving flipping mode
This commit is contained in:
@@ -142,6 +142,8 @@ function ReaderPaging:onToggleFlipping()
|
||||
self.flipping_page = self.current_page
|
||||
if self.flipping_mode then
|
||||
self:updateOriginalPage(self.current_page)
|
||||
else
|
||||
self:updateOriginalPage(nil)
|
||||
end
|
||||
self.ui:handleEvent(Event:new("SetHinting", not self.flipping_mode))
|
||||
UIManager:setDirty(self.view.dialog, "partial")
|
||||
@@ -208,7 +210,9 @@ end
|
||||
|
||||
function ReaderPaging:onPageUpdate(new_page_no, orig)
|
||||
self.current_page = new_page_no
|
||||
self.ui:handleEvent(Event:new("InitScrollPageStates", orig))
|
||||
if orig ~= "scrolling" then
|
||||
self.ui:handleEvent(Event:new("InitScrollPageStates", orig))
|
||||
end
|
||||
end
|
||||
|
||||
function ReaderPaging:onViewRecalculate(visible_area, page_area)
|
||||
@@ -239,8 +243,8 @@ end
|
||||
|
||||
function ReaderPaging:onInitScrollPageStates(orig)
|
||||
DEBUG("init scroll page states")
|
||||
if orig == "scrolling" then return true end
|
||||
if self.view.page_scroll then
|
||||
self.orig_page = self.current_page
|
||||
self.view.page_states = {}
|
||||
local blank_area = Geom:new{}
|
||||
blank_area:setSizeTo(self.view.dimen)
|
||||
@@ -255,6 +259,7 @@ function ReaderPaging:onInitScrollPageStates(orig)
|
||||
self:gotoPage(self.current_page + 1, "scrolling")
|
||||
end
|
||||
end
|
||||
self:gotoPage(self.orig_page, "scrolling")
|
||||
end
|
||||
return true
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user