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.
This commit is contained in:
poire-z
2021-05-19 22:57:50 +02:00
parent 33744217de
commit 0a3978f60b
3 changed files with 10 additions and 12 deletions

View File

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