mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
return to previous filemanager view instead of opening a new one
This commit is contained in:
@@ -41,19 +41,18 @@ function ReaderMenu:init()
|
||||
filemanager = {
|
||||
icon = "resources/icons/appbar.cabinet.files.png",
|
||||
callback = function()
|
||||
self.ui:handleEvent(Event:new("RestoreScreenMode",
|
||||
G_reader_settings:readSetting("screen_mode") or "portrait"))
|
||||
self.ui:onClose()
|
||||
UIManager:quit()
|
||||
self:onTapCloseMenu()
|
||||
local FileManager = require("apps/filemanager/filemanager")
|
||||
FileManager:showFiles()
|
||||
if not FileManager.is_running then
|
||||
UIManager:quit()
|
||||
FileManager:showFiles()
|
||||
end
|
||||
end,
|
||||
},
|
||||
home = {
|
||||
icon = "resources/icons/appbar.home.png",
|
||||
callback = function()
|
||||
self.ui:handleEvent(Event:new("RestoreScreenMode",
|
||||
G_reader_settings:readSetting("screen_mode") or "portrait"))
|
||||
self.ui:onClose()
|
||||
UIManager:quit()
|
||||
end,
|
||||
@@ -139,7 +138,7 @@ function ReaderMenu:setUpdateItemTable()
|
||||
})
|
||||
end
|
||||
})
|
||||
|
||||
|
||||
--typeset tab
|
||||
if KOBO_SCREEN_SAVER_LAST_BOOK then
|
||||
local exclude = self.ui.doc_settings:readSetting("exclude_screensaver") or false
|
||||
@@ -217,6 +216,11 @@ function ReaderMenu:onTapShowMenu()
|
||||
return true
|
||||
end
|
||||
|
||||
function ReaderMenu:onTapCloseMenu()
|
||||
self.ui:handleEvent(Event:new("CloseReaderMenu"))
|
||||
self.ui:handleEvent(Event:new("CloseConfigMenu"))
|
||||
end
|
||||
|
||||
function ReaderMenu:onSetDimensions(dimen)
|
||||
-- update listening according to new screen dimen
|
||||
if Device:isTouchDevice() then
|
||||
|
||||
Reference in New Issue
Block a user