mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
Bypass flState on suspend/wakeup
We pretty much always want to turn it off on suspend, and turn it on to some measure on wakeup. That, and nickel's FrontLightState is completely nonsensical on my device anyway...
This commit is contained in:
@@ -63,7 +63,6 @@ end
|
||||
-- Turn off front light before suspend.
|
||||
function KoboPowerD:beforeSuspend()
|
||||
if self.fl ~= nil then
|
||||
self.flState = true
|
||||
self.fl:setBrightness(0)
|
||||
end
|
||||
end
|
||||
@@ -73,7 +72,7 @@ function KoboPowerD:afterResume()
|
||||
if self.fl ~= nil then
|
||||
if KOBO_LIGHT_ON_START and tonumber(KOBO_LIGHT_ON_START) > -1 then
|
||||
self:setIntensity(math.min(KOBO_LIGHT_ON_START, 100))
|
||||
elseif self.flState then
|
||||
else
|
||||
self.fl:setBrightness(self.flIntensity)
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user