From 04a5e2acfa4d9bdf347b2cfd58c69d31f76cb0e4 Mon Sep 17 00:00:00 2001 From: Frans de Jonge Date: Wed, 10 Jun 2020 21:54:57 +0200 Subject: [PATCH] [fix, plugin] Wallabag: add quiet option to callAPI() (#6252) Dumb lazy workaround for . --- plugins/wallabag.koplugin/main.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/wallabag.koplugin/main.lua b/plugins/wallabag.koplugin/main.lua index aebca8335..9d4c155f7 100644 --- a/plugins/wallabag.koplugin/main.lua +++ b/plugins/wallabag.koplugin/main.lua @@ -366,7 +366,7 @@ function Wallabag:getArticleList() .. "&page=" .. page .. "&perPage=" .. self.articles_per_sync .. filtering - local articles_json = self:callAPI("GET", articles_url, nil, "", "") + local articles_json = self:callAPI("GET", articles_url, nil, "", "", true) if not articles_json then -- we may have hit the last page, there are no more articles @@ -485,7 +485,7 @@ end -- body: empty string if not needed -- filepath: downloads the file if provided, returns JSON otherwise ---- @todo separate call to internal API from the download on external server -function Wallabag:callAPI(method, apiurl, headers, body, filepath) +function Wallabag:callAPI(method, apiurl, headers, body, filepath, quiet) local request, sink = {}, {} local parsed @@ -556,7 +556,7 @@ function Wallabag:callAPI(method, apiurl, headers, body, filepath) os.remove(filepath) logger.dbg("Wallabag: Removed failed download: ", filepath) end - else + elseif not quiet then UIManager:show(InfoMessage:new{ text = _("Communication with server failed."), }) end