Prevent MessageList multiple request at the same time #1071

This commit is contained in:
the-djmaze 2023-06-12 17:00:23 +02:00
parent fabc162481
commit 3a3b2f0771
4 changed files with 26 additions and 23 deletions

View file

@ -196,10 +196,13 @@ MessagelistUserStore.reload = (bDropPagePosition = false, bDropCurrentFolderCach
(iError, oData, bCached) => {
let error = '';
if (iError) {
error = getNotification(iError);
if (Notifications.RequestAborted !== iError) {
MessagelistUserStore([]);
if ('reload' != oData?.reason) {
error = getNotification(iError);
MessagelistUserStore.loading(false);
}
// if (Notifications.RequestAborted !== iError) {
// MessagelistUserStore([]);
// }
// if (oData.message) { error = oData.message + error; }
// if (oData.reason) { error = oData.reason + " " + error; }
} else {
@ -278,9 +281,9 @@ MessagelistUserStore.reload = (bDropPagePosition = false, bDropCurrentFolderCach
MessagelistUserStore([]);
error = getNotification(Notifications.CantGetMessageList);
}
MessagelistUserStore.loading(false);
}
MessagelistUserStore.error(error);
MessagelistUserStore.loading(false);
},
{
// folder: FolderUserStore.currentFolder() ? self.currentFolder().fullName : ''),