[ReaderFooter] Update status bar in real time when inverting page turning (#12424)

This commit is contained in:
David
2024-09-25 20:16:06 +01:00
committed by GitHub
parent beaad4d337
commit 08205c47c8
4 changed files with 67 additions and 14 deletions

View File

@@ -2445,6 +2445,15 @@ function ReaderFooter:onNetworkConnected()
end
ReaderFooter.onNetworkDisconnected = ReaderFooter.onNetworkConnected
function ReaderFooter:onSwapPageTurnButtons()
if self.settings.page_turning_inverted then
-- We may receive the event *before* DeviceListener, so delay this to make sure it had a chance to actually swap the settings.
-- Also delay it further to avoid screwing with TouchMenu highlights...
UIManager:scheduleIn(0.5, self.maybeUpdateFooter, self)
end
end
ReaderFooter.onToggleReadingOrder = ReaderFooter.onSwapPageTurnButtons
function ReaderFooter:onSetRotationMode()
self:updateFooterContainer()
self:resetLayout(true)