mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
[fix, plugin] Wallabag: avoid crash when setDownloadDirectory doesn't have a touchmenu_instance (#8933)
Fixes #8930.
This commit is contained in:
@@ -1077,12 +1077,14 @@ end
|
||||
|
||||
function Wallabag:setDownloadDirectory(touchmenu_instance)
|
||||
require("ui/downloadmgr"):new{
|
||||
onConfirm = function(path)
|
||||
logger.dbg("Wallabag: set download directory to: ", path)
|
||||
self.directory = path
|
||||
self:saveSettings()
|
||||
touchmenu_instance:updateItems()
|
||||
end,
|
||||
onConfirm = function(path)
|
||||
logger.dbg("Wallabag: set download directory to: ", path)
|
||||
self.directory = path
|
||||
self:saveSettings()
|
||||
if touchmenu_instance then
|
||||
touchmenu_instance:updateItems()
|
||||
end
|
||||
end,
|
||||
}:chooseDir()
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user