mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
UIManager: Don't lose track of the original rotation on reboot/poweroff (#9606)
And, actually, stop enforcing Portrait; Screensaver already handles rotation as necessary depending on the exact screensaver mode. Fix https://www.mobileread.com/forums/showthread.php?t=349522
This commit is contained in:
@@ -61,9 +61,7 @@ function UIManager:init()
|
||||
self.poweroff_action = function()
|
||||
self._entered_poweroff_stage = true
|
||||
logger.info("Powering off the device...")
|
||||
Device.orig_rotation_mode = Device.screen:getRotationMode()
|
||||
self:broadcastEvent(Event:new("Close"))
|
||||
Screen:setRotationMode(Screen.ORIENTATION_PORTRAIT)
|
||||
local Screensaver = require("ui/screensaver")
|
||||
Screensaver:setup("poweroff", _("Powered off"))
|
||||
Screensaver:show()
|
||||
@@ -76,9 +74,7 @@ function UIManager:init()
|
||||
self.reboot_action = function()
|
||||
self._entered_poweroff_stage = true
|
||||
logger.info("Rebooting the device...")
|
||||
Device.orig_rotation_mode = Device.screen:getRotationMode()
|
||||
self:broadcastEvent(Event:new("Close"))
|
||||
Screen:setRotationMode(Screen.ORIENTATION_PORTRAIT)
|
||||
local Screensaver = require("ui/screensaver")
|
||||
Screensaver:setup("reboot", _("Rebooting…"))
|
||||
Screensaver:show()
|
||||
|
||||
Reference in New Issue
Block a user