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
reviewable/pr9088/r1
NiLuJe 2 years ago committed by GitHub
parent 49c02790f6
commit 60b043ebe9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -2473,8 +2473,12 @@ function ReaderFooter:maybeUpdateFooter()
end end
function ReaderFooter:onFrontlightStateChanged() function ReaderFooter:onFrontlightStateChanged()
if self.settings.frontlight then -- Custom variant of maybeUpdateFooter that *also* whitelists the FL widget...
self:maybeUpdateFooter() 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
end end

@ -25,6 +25,7 @@ local _ = require("gettext")
local Screen = Device.screen local Screen = Device.screen
local FrontLightWidget = FocusManager:new{ local FrontLightWidget = FocusManager:new{
name = "FrontLightWidget",
width = nil, width = nil,
height = nil, height = nil,
-- This should stay active during natural light configuration -- This should stay active during natural light configuration

Loading…
Cancel
Save