File browser: show Folder Menu on long-press on Home icon (#10298)

This commit is contained in:
hius07
2023-04-05 08:24:41 +03:00
committed by GitHub
parent b01e1c5918
commit 483a005cc2
3 changed files with 4 additions and 4 deletions

View File

@@ -119,8 +119,8 @@ function FileManager:setupLayout()
button_padding = Screen:scaleBySize(5),
left_icon = "home",
left_icon_size_ratio = 1,
left_icon_tap_callback = function() self:onShowFolderMenu() end,
left_icon_hold_callback = false, -- propagate long-press to dispatcher
left_icon_tap_callback = function() self:goHome() end,
left_icon_hold_callback = function() self:onShowFolderMenu() end,
right_icon = "plus",
right_icon_size_ratio = 1,
right_icon_tap_callback = function() self:onShowPlusMenu() end,

View File

@@ -405,7 +405,7 @@ function FileChooser:changeToPath(path, focused_path)
end
if not unreadable_dir_content[path][focused_path] then
unreadable_dir_content[path][focused_path] = {
text = focused_path:sub(#path+2),
text = focused_path:sub(#path > 1 and #path+2 or 2),
fullpath = focused_path,
attr = lfs.attributes(focused_path),
}

View File

@@ -7,7 +7,7 @@ return {
tap_top_right_corner = nil,
tap_right_bottom_corner = nil,
tap_left_bottom_corner = Device:hasFrontlight() and {toggle_frontlight = true,} or nil,
hold_top_left_corner = {filemanager = true,},
hold_top_left_corner = nil,
hold_top_right_corner = {refresh_content = true,},
hold_bottom_left_corner = nil,
hold_bottom_right_corner = nil,