Nextcloud Show spinner when saving message attachments #96

This commit is contained in:
the-djmaze 2022-10-12 18:49:09 +02:00
parent b5fb4f5b52
commit 211600135d

View file

@ -10,19 +10,24 @@
.map(item => item?.checked() /*&& !item?.isLinked()*/ ? item.download : '') .map(item => item?.checked() /*&& !item?.isLinked()*/ ? item.download : '')
.filter(v => v); .filter(v => v);
if (hashes.length) { if (hashes.length) {
view.saveNextcloudLoading(true);
rl.fetchJSON('./?/Json/&q[]=/0/', {}, { rl.fetchJSON('./?/Json/&q[]=/0/', {}, {
Action: 'AttachmentsActions', Action: 'AttachmentsActions',
Do: 'nextcloud', Do: 'nextcloud',
Hashes: hashes Hashes: hashes
}) })
.then(result => { .then(result => {
view.saveNextcloudLoading(false);
if (result?.Result) { if (result?.Result) {
// success // success
} else { } else {
view.saveNextcloudError(true); view.saveNextcloudError(true);
} }
}) })
.catch(() => view.saveNextcloudError(true)); .catch(() => {
view.saveNextcloudLoading(false);
view.saveNextcloudError(true);
});
} }
}; };
} }