FileManagerHistory: Handle rotation events

Fix #7518
pull/7527/head
NiLuJe 3 years ago
parent 5f9f7ce1da
commit a185290549

@ -134,6 +134,18 @@ function FileManagerHistory:onShowHist()
onMenuHold = self.onMenuHold, onMenuHold = self.onMenuHold,
_manager = self, _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:updateItemTable()
self.hist_menu.close_callback = function() self.hist_menu.close_callback = function()
-- Close it at next tick so it stays displayed -- Close it at next tick so it stays displayed

@ -300,7 +300,7 @@ else
if start_with == "history" then if start_with == "history" then
local FileManagerHistory = require("apps/filemanager/filemanagerhistory") local FileManagerHistory = require("apps/filemanager/filemanagerhistory")
UIManager:nextTick(function() UIManager:nextTick(function()
FileManagerHistory:onShowHist(last_file) FileManagerHistory:onShowHist()
end) end)
elseif start_with == "favorites" then elseif start_with == "favorites" then
local FileManagerCollection = require("apps/filemanager/filemanagercollection") local FileManagerCollection = require("apps/filemanager/filemanagercollection")

Loading…
Cancel
Save