From 211600135d60b2100a05960c05a296361211f350 Mon Sep 17 00:00:00 2001 From: the-djmaze <> Date: Wed, 12 Oct 2022 18:49:09 +0200 Subject: [PATCH] Nextcloud Show spinner when saving message attachments #96 --- plugins/nextcloud/js/attachments.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/plugins/nextcloud/js/attachments.js b/plugins/nextcloud/js/attachments.js index cf312723b..2a3cf448c 100644 --- a/plugins/nextcloud/js/attachments.js +++ b/plugins/nextcloud/js/attachments.js @@ -10,19 +10,24 @@ .map(item => item?.checked() /*&& !item?.isLinked()*/ ? item.download : '') .filter(v => v); if (hashes.length) { + view.saveNextcloudLoading(true); rl.fetchJSON('./?/Json/&q[]=/0/', {}, { Action: 'AttachmentsActions', Do: 'nextcloud', Hashes: hashes }) .then(result => { + view.saveNextcloudLoading(false); if (result?.Result) { // success } else { view.saveNextcloudError(true); } }) - .catch(() => view.saveNextcloudError(true)); + .catch(() => { + view.saveNextcloudLoading(false); + view.saveNextcloudError(true); + }); } }; }