mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
ReaderFooter: Refresh the footer on frontlight state changes issued by the frontlight widget (#9084)
c.f, https://www.mobileread.com/forums/showpost.php?p=4220159&postcount=7
This commit is contained in:
@@ -2473,8 +2473,12 @@ function ReaderFooter:maybeUpdateFooter()
|
||||
end
|
||||
|
||||
function ReaderFooter:onFrontlightStateChanged()
|
||||
if self.settings.frontlight then
|
||||
self:maybeUpdateFooter()
|
||||
-- Custom variant of maybeUpdateFooter that *also* whitelists the FL widget...
|
||||
local top_wg = UIManager:getTopWidget()
|
||||
if top_wg == "ReaderUI" or top_wg == "FrontLightWidget" then
|
||||
self:onUpdateFooter(self.view.footer_visible)
|
||||
else
|
||||
self:onUpdateFooter()
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -25,6 +25,7 @@ local _ = require("gettext")
|
||||
local Screen = Device.screen
|
||||
|
||||
local FrontLightWidget = FocusManager:new{
|
||||
name = "FrontLightWidget",
|
||||
width = nil,
|
||||
height = nil,
|
||||
-- This should stay active during natural light configuration
|
||||
|
||||
Reference in New Issue
Block a user