mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
Reader: always exit to book folder (#12129)
This commit is contained in:
@@ -45,8 +45,9 @@ function ReaderMenu:init()
|
||||
remember = false,
|
||||
callback = function()
|
||||
self:onTapCloseMenu()
|
||||
local file = self.ui.document.file
|
||||
self.ui:onClose()
|
||||
self.ui:showFileManager()
|
||||
self.ui:showFileManager(file)
|
||||
end,
|
||||
},
|
||||
main = {
|
||||
|
||||
@@ -164,9 +164,10 @@ end
|
||||
|
||||
function ReaderStatus:openFileBrowser()
|
||||
local FileManager = require("apps/filemanager/filemanager")
|
||||
local file = self.ui.document.file
|
||||
self.ui:onClose()
|
||||
if not FileManager.instance then
|
||||
self.ui:showFileManager()
|
||||
self.ui:showFileManager(file)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -648,7 +648,7 @@ function ReaderUI:showReaderCoroutine(file, provider, seamless)
|
||||
UIManager:show(InfoMessage:new{
|
||||
text = _("No reader engine for this file or invalid file.")
|
||||
})
|
||||
self:showFileManager()
|
||||
self:showFileManager(file)
|
||||
end
|
||||
end)
|
||||
end
|
||||
@@ -668,7 +668,7 @@ function ReaderUI:doShowReader(file, provider, seamless)
|
||||
UIManager:show(InfoMessage:new{
|
||||
text = _("No reader engine for this file or invalid file.")
|
||||
})
|
||||
self:showFileManager()
|
||||
self:showFileManager(file)
|
||||
return
|
||||
end
|
||||
if document.is_locked then
|
||||
@@ -678,7 +678,7 @@ function ReaderUI:doShowReader(file, provider, seamless)
|
||||
if coroutine.running() then
|
||||
local unlock_success = coroutine.yield()
|
||||
if not unlock_success then
|
||||
self:showFileManager()
|
||||
self:showFileManager(file)
|
||||
return
|
||||
end
|
||||
end
|
||||
@@ -859,8 +859,9 @@ function ReaderUI:dealWithLoadDocumentFailure()
|
||||
end
|
||||
|
||||
function ReaderUI:onHome()
|
||||
local file = self.document.file
|
||||
self:onClose()
|
||||
self:showFileManager()
|
||||
self:showFileManager(file)
|
||||
return true
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user