FileManagerHistory: Handle rotation events

Fix #7518
This commit is contained in:
NiLuJe committed 2021-04-10 00:39:49 +02:00
1 parent 5f9f7ce1da
commit a185290549
2 files changed
+13 -1

No files matched your search

@@ -134,6 +134,18 @@ function FileManagerHistory:onShowHist()
onMenuHold = self.onMenuHold,
_manager = self,
}
-- Handle rotation events
local this = self
function self.hist_menu:onSetRotationMode(rotation)
if rotation ~= nil and rotation ~= Screen:getRotationMode() then
UIManager:close(this.hist_menu)
Screen:setRotationMode(rotation)
this:onShowHist()
end
return true
end
self:updateItemTable()
self.hist_menu.close_callback = function()
-- Close it at next tick so it stays displayed
+1 -1
View File
@@ -300,7 +300,7 @@ else
if start_with == "history" then
local FileManagerHistory = require("apps/filemanager/filemanagerhistory")
UIManager:nextTick(function()
FileManagerHistory:onShowHist(last_file)
FileManagerHistory:onShowHist()
end)
elseif start_with == "favorites" then
local FileManagerCollection = require("apps/filemanager/filemanagercollection")