mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
FileManager: Handle the FlushSettings event (#12425)
It's used on Android when we're murdered by the task switcher, and when doing an OTA update. Fix #12124
This commit is contained in:
@@ -761,6 +761,11 @@ function FileManager:onClose()
|
||||
return true
|
||||
end
|
||||
|
||||
function FileManager:onFlushSettings()
|
||||
self:handleEvent(Event:new("SaveSettings"))
|
||||
G_reader_settings:flush()
|
||||
end
|
||||
|
||||
function FileManager:onCloseWidget()
|
||||
if FileManager.instance == self then
|
||||
logger.dbg("Tearing down FileManager", tostring(self))
|
||||
|
||||
Reference in New Issue
Block a user