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)
reviewable/pr8066/r1
yparitcher 3 years ago committed by GitHub
parent b3c4b8dc94
commit 7148aed51c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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,
})

Loading…
Cancel
Save