mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
Fix diagonal refresh not working in TOC and History
By delegating diagonal swipe handling to GestureManager only when the Menu or FileChooser instance is the FileManager one.
This commit is contained in:
@@ -129,7 +129,7 @@ function FileManager:init()
|
||||
local g_show_hidden = G_reader_settings:readSetting("show_hidden")
|
||||
local show_hidden = g_show_hidden == nil and DSHOWHIDDENFILES or g_show_hidden
|
||||
local file_chooser = FileChooser:new{
|
||||
-- remeber to adjust the height when new item is added to the group
|
||||
-- remember to adjust the height when new item is added to the group
|
||||
path = self.root_path,
|
||||
focused_path = self.focused_file,
|
||||
collate = G_reader_settings:readSetting("collate") or "strcoll",
|
||||
@@ -150,6 +150,8 @@ function FileManager:init()
|
||||
close_callback = function() return self:onClose() end,
|
||||
-- allow left bottom tap gesture, otherwise it is eaten by hidden return button
|
||||
return_arrow_propagation = true,
|
||||
-- allow Menu widget to delegate handling of some gestures to GestureManager
|
||||
is_file_manager = true,
|
||||
}
|
||||
self.file_chooser = file_chooser
|
||||
self.focused_file = nil -- use it only once
|
||||
|
||||
@@ -1191,7 +1191,8 @@ function Menu:onSwipe(arg, ges_ev)
|
||||
-- no use for now
|
||||
do end -- luacheck: ignore 541
|
||||
else -- diagonal swipe
|
||||
if G_reader_settings:readSetting("gesture_fm") and G_reader_settings:readSetting("gesture_fm")["short_diagonal_swipe"] then
|
||||
if self.is_file_manager and G_reader_settings:readSetting("gesture_fm") and
|
||||
G_reader_settings:readSetting("gesture_fm")["short_diagonal_swipe"] then
|
||||
-- managed by gesture manager
|
||||
do end -- luacheck: ignore 541
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user