mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-07-13 03:27:39 +03:00
Improvement for #518
This commit is contained in:
parent
b01b18647a
commit
1d982f3306
1 changed files with 5 additions and 3 deletions
|
|
@ -193,17 +193,18 @@ MessagelistUserStore.reload = (bDropPagePosition = false, bDropCurrentFolderCach
|
||||||
}
|
}
|
||||||
|
|
||||||
MessagelistUserStore.loading(true);
|
MessagelistUserStore.loading(true);
|
||||||
MessagelistUserStore.error('');
|
|
||||||
Remote.messageList(
|
Remote.messageList(
|
||||||
(iError, oData, bCached) => {
|
(iError, oData, bCached) => {
|
||||||
|
let error = '';
|
||||||
if (iError) {
|
if (iError) {
|
||||||
|
error = getNotification(iError);
|
||||||
if (Notification.RequestAborted !== iError) {
|
if (Notification.RequestAborted !== iError) {
|
||||||
MessagelistUserStore([]);
|
MessagelistUserStore([]);
|
||||||
}
|
}
|
||||||
MessagelistUserStore.error(getNotification(iError));
|
|
||||||
} else {
|
} else {
|
||||||
const collection = MessageCollectionModel.reviveFromJson(oData.Result, bCached);
|
const collection = MessageCollectionModel.reviveFromJson(oData.Result, bCached);
|
||||||
if (collection) {
|
if (collection) {
|
||||||
|
error = '';
|
||||||
let unreadCountChange = false;
|
let unreadCountChange = false;
|
||||||
|
|
||||||
const
|
const
|
||||||
|
|
@ -273,8 +274,9 @@ MessagelistUserStore.reload = (bDropPagePosition = false, bDropCurrentFolderCach
|
||||||
} else {
|
} else {
|
||||||
MessagelistUserStore.count(0);
|
MessagelistUserStore.count(0);
|
||||||
MessagelistUserStore([]);
|
MessagelistUserStore([]);
|
||||||
MessagelistUserStore.error(getNotification(Notification.CantGetMessageList));
|
error = getNotification(Notification.CantGetMessageList);
|
||||||
}
|
}
|
||||||
|
MessagelistUserStore.error(error);
|
||||||
}
|
}
|
||||||
MessagelistUserStore.loading(false);
|
MessagelistUserStore.loading(false);
|
||||||
},
|
},
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue