[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.
reviewable/pr7829/r1
hius07 3 years ago committed by GitHub
parent ba070c24de
commit dccd49b652
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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

Loading…
Cancel
Save