FileManagerCollection: Handle rotation events

reviewable/pr7527/r1
NiLuJe 3 years ago
parent a185290549
commit 99372e8c63

@ -147,6 +147,18 @@ function FileManagerCollection:onShowColl(collection)
_manager = self,
collection = collection,
}
-- Handle rotation events
local this = self
function self.coll_menu:onSetRotationMode(rotation)
if rotation ~= nil and rotation ~= Screen:getRotationMode() then
UIManager:close(this.coll_menu)
Screen:setRotationMode(rotation)
this:onShowColl()
end
return true
end
self:updateItemTable()
self.coll_menu.close_callback = function()
-- Close it at next tick so it stays displayed

Loading…
Cancel
Save