mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
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:
@@ -122,9 +122,6 @@ end
|
||||
function KoboLight:onTap()
|
||||
Device:getPowerDevice():toggleFrontlight()
|
||||
self:onShowOnOff()
|
||||
if self.view.footer_visible and self.view.footer.settings.frontlight then
|
||||
self.view.footer:updateFooter()
|
||||
end
|
||||
return true
|
||||
end
|
||||
|
||||
@@ -153,9 +150,6 @@ function KoboLight:onSwipe(_, ges)
|
||||
powerd:setIntensity(new_intensity)
|
||||
self:onShowIntensity()
|
||||
end
|
||||
if self.view.footer_visible and self.view.footer.settings.frontlight then
|
||||
self.view.footer:updateFooter()
|
||||
end
|
||||
return true
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user