Skip to content

Commit 7e52c15

Browse files
authored
FileManager: Handle the FlushSettings event (koreader#12425)
It's used on Android when we're murdered by the task switcher, and when doing an OTA update. Fix koreader#12124
1 parent 5fc5386 commit 7e52c15

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

frontend/apps/filemanager/filemanager.lua

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -761,6 +761,11 @@ function FileManager:onClose()
761761
return true
762762
end
763763

764+
function FileManager:onFlushSettings()
765+
self:handleEvent(Event:new("SaveSettings"))
766+
G_reader_settings:flush()
767+
end
768+
764769
function FileManager:onCloseWidget()
765770
if FileManager.instance == self then
766771
logger.dbg("Tearing down FileManager", tostring(self))

0 commit comments

Comments
 (0)