Reader: remove full refresh on vertical swipes

Small diagonal swipes is what can be used for
full refrehes. Tweak a bit how it is done.
pull/7712/head
poire-z 3 years ago
parent 33744217de
commit 0a3978f60b

@ -426,8 +426,10 @@ function ReaderPaging:onSwipe(_, ges)
local direction = BD.flipDirectionIfMirroredUILayout(ges.direction)
if self.bookmark_flipping_mode then
self:bookmarkFlipping(self.current_page, ges)
return true
elseif self.page_flipping_mode and self.original_page then
self:_gotoPage(self.original_page)
return true
elseif direction == "west" then
if G_reader_settings:nilOrFalse("page_turns_disable_swipe") then
if self.inverse_reading_order then
@ -435,6 +437,7 @@ function ReaderPaging:onSwipe(_, ges)
else
self:onGotoViewRel(1)
end
return true
end
elseif direction == "east" then
if G_reader_settings:nilOrFalse("page_turns_disable_swipe") then
@ -443,12 +446,8 @@ function ReaderPaging:onSwipe(_, ges)
else
self:onGotoViewRel(-1)
end
return true
end
else
-- update footer (time & battery)
self.view.footer:onUpdateFooter()
-- trigger full refresh
UIManager:setDirty(nil, "full")
end
end

@ -524,6 +524,7 @@ function ReaderRolling:onSwipe(_, ges)
else
self:onGotoViewRel(1)
end
return true
end
elseif direction == "east" then
if G_reader_settings:nilOrFalse("page_turns_disable_swipe") then
@ -532,12 +533,8 @@ function ReaderRolling:onSwipe(_, ges)
else
self:onGotoViewRel(-1)
end
return true
end
else
-- update footer (time & battery)
self.view.footer:onUpdateFooter()
-- trigger full refresh
UIManager:setDirty(nil, "full")
end
end

@ -356,8 +356,10 @@ function DeviceListener:onRestart()
end
function DeviceListener:onFullRefresh()
self.ui:handleEvent(Event:new("UpdateFooter"))
UIManager:setDirty("all", "full")
if self.ui and self.ui.view then
self.ui:handleEvent(Event:new("UpdateFooter", self.ui.view.footer_visible))
end
UIManager:setDirty(nil, "full")
end
return DeviceListener

Loading…
Cancel
Save