ReaderStatus: end book action: delete file: go to current directory in FM (#8042)

Go to the directory of the deleted file, instead of the folder you happend to switch into the reader from as this may have changed (via changing books from history etc)
This commit is contained in:
yparitcher
2021-08-11 03:54:44 -04:00
committed by GitHub
parent b3c4b8dc94
commit 7148aed51c

View File

@@ -6,6 +6,7 @@ local Event = require("ui/event")
local InfoMessage = require("ui/widget/infomessage")
local InputContainer = require("ui/widget/container/inputcontainer")
local UIManager = require("ui/uimanager")
local util = require("util")
local _ = require("gettext")
local T = require("ffi/util").template
@@ -222,7 +223,8 @@ function ReaderStatus:deleteFile(file, text_end_book)
if FileManager.instance then
FileManager.instance.file_chooser:refreshPath()
else
FileManager:showFiles()
local path = util.splitFilePathName(file)
FileManager:showFiles(path)
end
end,
})