mirror of
https://github.com/koreader/koreader.git
synced 2025-12-24 12:14:05 +01:00
Reader: Do less work on same-orientation non-gyro rotations (#11297)
Namely, don't recompute layouts, as they do not change. (The gyro codepaths were already doing something similar.) * Keep ConfigDialog, FileManagerMenu & ReaderMenu open on rotation. (In practice, only ConfigDialog is affected, as *Menu doesn't handle the rotation event.) * Plugged an instance leak in the aforementioned Menu classes. * Unify behavior & code with the gyro codepaths.
This commit is contained in:
@@ -158,11 +158,11 @@ function ReaderConfig:onSwipeShowConfigMenu(ges)
|
||||
end
|
||||
end
|
||||
|
||||
-- For some reason, things are fine and dandy without any of this for rotations, but we need it for actual resizes...
|
||||
function ReaderConfig:onSetDimensions(dimen)
|
||||
-- since we cannot redraw config_dialog with new size, we close
|
||||
-- the old one on screen size change
|
||||
if self.config_dialog then
|
||||
self.config_dialog:closeDialog()
|
||||
-- init basically calls update & initGesListener and nothing else, which is exactly what we want.
|
||||
self.config_dialog:init()
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user