[fix] OPDS catalog invoked from reader: crash KOReader on close (#7825)

OPDS catalog can be invoked from reader with gesture.
Then on closing OPDS catalog, KOReader crashes.
Let's jump to the download folder instead.
Closes #7784.
This commit is contained in:
hius07
2021-06-09 22:32:02 +03:00
committed by GitHub
parent ba070c24de
commit dccd49b652

View File

@@ -23,8 +23,13 @@ function OPDS:showCatalog()
local OPDSCatalog = require("opdscatalog")
local filemanagerRefresh = function() self.ui:onRefresh() end
function OPDSCatalog:onClose()
filemanagerRefresh()
UIManager:close(self)
local FileManager = require("apps/filemanager/filemanager")
if FileManager.instance then
filemanagerRefresh()
else
FileManager:showFiles(G_reader_settings:readSetting("download_dir"))
end
end
OPDSCatalog:showCatalog()
end