mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
Refresh current path in filemanager after file operation
This behavior is more consistent when e.g. a file is moved to ".."
This commit is contained in:
@@ -92,7 +92,7 @@ function FileManager:init()
|
||||
enabled = fileManager.clipboard and true or false,
|
||||
callback = function()
|
||||
pasteHere(file)
|
||||
self:changeToPath(util.realpath(file):match("(.*/)"))
|
||||
self:refreshPath()
|
||||
UIManager:close(self.file_dialog)
|
||||
end,
|
||||
},
|
||||
@@ -110,7 +110,7 @@ function FileManager:init()
|
||||
callback = function()
|
||||
local path = util.realpath(file)
|
||||
deleteFile(file)
|
||||
self:changeToPath(path:match("(.*/)"))
|
||||
self:refreshPath()
|
||||
UIManager:close(self.file_dialog)
|
||||
end,
|
||||
},
|
||||
|
||||
@@ -63,7 +63,11 @@ end
|
||||
function FileChooser:changeToPath(path)
|
||||
path = util.realpath(path)
|
||||
self.path = path
|
||||
self:swithItemTable(nil, self:genItemTableFromPath(path))
|
||||
self:refreshPath()
|
||||
end
|
||||
|
||||
function FileChooser:refreshPath()
|
||||
self:swithItemTable(nil, self:genItemTableFromPath(self.path))
|
||||
end
|
||||
|
||||
function FileChooser:toggleHiddenFiles()
|
||||
|
||||
Reference in New Issue
Block a user