mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
FM: Make "Refresh content" an actual Event/Gesture (#7592)
* And enable it by default in the FM as the "hold on top-right corner" Gesture, instead of the onHold handler of the "+" button.
This commit is contained in:
@@ -131,13 +131,6 @@ function FileManager:setupLayout()
|
||||
padding_right = Size.padding.large,
|
||||
padding_bottom = 0,
|
||||
callback = function() self:onShowPlusMenu() end,
|
||||
hold_callback = function()
|
||||
self:onRefresh()
|
||||
UIManager:show(InfoMessage:new{
|
||||
text = _("Content refreshed."),
|
||||
timeout = 2,
|
||||
})
|
||||
end,
|
||||
}
|
||||
|
||||
self.path_text = TextWidget:new{
|
||||
@@ -1194,4 +1187,12 @@ function FileManager:onHome()
|
||||
return self:goHome()
|
||||
end
|
||||
|
||||
function FileManager:onRefreshContent()
|
||||
self:onRefresh()
|
||||
UIManager:show(InfoMessage:new{
|
||||
text = _("Content refreshed."),
|
||||
timeout = 2,
|
||||
})
|
||||
end
|
||||
|
||||
return FileManager
|
||||
|
||||
@@ -90,6 +90,7 @@ local settingsList = {
|
||||
-- filemanager settings
|
||||
folder_up = { category="none", event="FolderUp", title=_("Folder up"), filemanager=true},
|
||||
show_plus_menu = { category="none", event="ShowPlusMenu", title=_("Show plus menu"), filemanager=true},
|
||||
refresh_content = { category="none", event="RefreshContent", title=_("Refresh content"), filemanager=true},
|
||||
folder_shortcuts = { category="none", event="ShowFolderShortcutsDialog", title=_("Folder shortcuts"), filemanager=true, separator=true,},
|
||||
|
||||
-- reader settings
|
||||
@@ -217,6 +218,7 @@ local dispatcher_menu_order = {
|
||||
-- filemanager
|
||||
"folder_up",
|
||||
"show_plus_menu",
|
||||
"refresh_content",
|
||||
"folder_shortcuts",
|
||||
|
||||
-- reader
|
||||
|
||||
@@ -8,7 +8,7 @@ return {
|
||||
tap_right_bottom_corner = nil,
|
||||
tap_left_bottom_corner = Device:hasFrontlight() and {toggle_frontlight = true,} or nil,
|
||||
hold_top_left_corner = nil,
|
||||
hold_top_right_corner = nil,
|
||||
hold_top_right_corner = {refresh_content = true,},
|
||||
hold_bottom_left_corner = nil,
|
||||
hold_bottom_right_corner = nil,
|
||||
one_finger_swipe_left_edge_down = Device:hasFrontlight() and {decrease_frontlight = 0,} or nil,
|
||||
|
||||
Reference in New Issue
Block a user