mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
[CoverImage] Honor rotation after opening of a book (#11752)
If rotation changes, create a new cache entry and use that if necessary. Fixes #11713.
This commit is contained in:
@@ -781,7 +781,7 @@ function ReaderView:onSetRotationMode(rotation)
|
||||
if rotation ~= nil then
|
||||
local old_rotation = Screen:getRotationMode()
|
||||
if rotation == old_rotation then
|
||||
return true
|
||||
return
|
||||
end
|
||||
|
||||
-- NOTE: We cannot rely on getScreenMode, as it actually checks the screen dimensions, instead of the rotation mode.
|
||||
@@ -798,7 +798,7 @@ function ReaderView:onSetRotationMode(rotation)
|
||||
Screen:setRotationMode(rotation)
|
||||
UIManager:setDirty(self.dialog, "full")
|
||||
Notification:notify(T(_("Rotation mode set to: %1"), optionsutil:getOptionText("SetRotationMode", rotation)))
|
||||
return true
|
||||
return
|
||||
end
|
||||
|
||||
Screen:setRotationMode(rotation)
|
||||
@@ -810,7 +810,7 @@ function ReaderView:onSetRotationMode(rotation)
|
||||
self.ui:onScreenResize(new_screen_size)
|
||||
self.ui:handleEvent(Event:new("InitScrollPageStates"))
|
||||
Notification:notify(T(_("Rotation mode set to: %1"), optionsutil:getOptionText("SetRotationMode", rotation)))
|
||||
return true
|
||||
return
|
||||
end
|
||||
|
||||
function ReaderView:onSetDimensions(dimensions)
|
||||
|
||||
Reference in New Issue
Block a user