Add onFrontlightStateChanged event (#2966)

So we do not need the hacky solution in KoboLight plugin anymore. PageFooter can receive and process the event itself.
This commit is contained in:
Hzj_jie
2017-06-19 19:00:36 -07:00
committed by GitHub
parent bd92d68b7f
commit d83de47204
3 changed files with 22 additions and 11 deletions

View File

@@ -668,4 +668,10 @@ function ReaderFooter:onSuspend()
end
end
function ReaderFooter:onFrontlightStateChanged()
if self.settings.frontlight then
self:updateFooter()
end
end
return ReaderFooter