|
|
@ -185,18 +185,18 @@ function FileManager:setupLayout()
|
|
|
|
return true
|
|
|
|
return true
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
function file_chooser:onFileHold(file)
|
|
|
|
function file_chooser:onFileHold(item)
|
|
|
|
if file_manager.select_mode then
|
|
|
|
if file_manager.select_mode then
|
|
|
|
file_manager:tapPlus()
|
|
|
|
file_manager:tapPlus()
|
|
|
|
else
|
|
|
|
else
|
|
|
|
self:showFileDialog(file)
|
|
|
|
self:showFileDialog(item)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
function file_chooser:showFileDialog(file) -- luacheck: ignore
|
|
|
|
function file_chooser:showFileDialog(item) -- luacheck: ignore
|
|
|
|
local is_file = isFile(file)
|
|
|
|
local file = item.path
|
|
|
|
local is_folder = lfs.attributes(file, "mode") == "directory"
|
|
|
|
local is_file = item.is_file
|
|
|
|
local is_not_parent_folder = BaseUtil.basename(file) ~= ".."
|
|
|
|
local is_not_parent_folder = not item.is_go_up
|
|
|
|
|
|
|
|
|
|
|
|
local function close_dialog_callback()
|
|
|
|
local function close_dialog_callback()
|
|
|
|
UIManager:close(self.file_dialog)
|
|
|
|
UIManager:close(self.file_dialog)
|
|
|
@ -324,9 +324,7 @@ function FileManager:setupLayout()
|
|
|
|
},
|
|
|
|
},
|
|
|
|
})
|
|
|
|
})
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
else -- folder
|
|
|
|
|
|
|
|
|
|
|
|
if is_folder then
|
|
|
|
|
|
|
|
local folder = BaseUtil.realpath(file)
|
|
|
|
local folder = BaseUtil.realpath(file)
|
|
|
|
table.insert(buttons, {
|
|
|
|
table.insert(buttons, {
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -1495,7 +1493,7 @@ function FileManager:openFile(file, provider, doc_caller_callback, aux_caller_ca
|
|
|
|
if provider == nil then
|
|
|
|
if provider == nil then
|
|
|
|
provider = DocumentRegistry:getProvider(file, true) -- include auxiliary
|
|
|
|
provider = DocumentRegistry:getProvider(file, true) -- include auxiliary
|
|
|
|
end
|
|
|
|
end
|
|
|
|
if provider.order then -- auxiliary
|
|
|
|
if provider and provider.order then -- auxiliary
|
|
|
|
if aux_caller_callback then
|
|
|
|
if aux_caller_callback then
|
|
|
|
aux_caller_callback()
|
|
|
|
aux_caller_callback()
|
|
|
|
end
|
|
|
|
end
|
|
|
|