mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
fix(kobo suspend): ignore user input in suspend mode
This commit is contained in:
@@ -111,6 +111,16 @@ function UIManager:init()
|
||||
self.event_handlers["Light"] = function()
|
||||
Device:getPowerDevice():toggleFrontlight()
|
||||
end
|
||||
self.event_handlers["__default__"] = function(input_event)
|
||||
if Device.screen_saver_mode then
|
||||
-- Suspension in Kobo can be interrupted by screen updates. We
|
||||
-- ignore user touch input here so screen udpate won't be
|
||||
-- triggered in suspend mode
|
||||
return
|
||||
else
|
||||
self:sendEvent(input_event)
|
||||
end
|
||||
end
|
||||
elseif Device:isKindle() then
|
||||
self.event_handlers["IntoSS"] = function()
|
||||
self:sendEvent(Event:new("FlushSettings"))
|
||||
|
||||
Reference in New Issue
Block a user