mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-07-13 03:27:39 +03:00
Resolve #471 by extending fetch messagelist to 60 seconds and handling timeout/abort
This commit is contained in:
parent
31b12c3625
commit
2c4bd445a5
3 changed files with 4 additions and 4 deletions
|
|
@ -175,7 +175,7 @@ export class AbstractFetchRemote
|
||||||
)
|
)
|
||||||
.catch(err => {
|
.catch(err => {
|
||||||
console.error(err);
|
console.error(err);
|
||||||
fCallback && fCallback(err.name == 'AbortError' ? 2 : 1);
|
fCallback && fCallback(err.name == 'AbortError' ? 2 : 1, err);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -54,7 +54,7 @@ class RemoteUserFetch extends AbstractFetchRemote {
|
||||||
this.request('MessageList',
|
this.request('MessageList',
|
||||||
fCallback,
|
fCallback,
|
||||||
params,
|
params,
|
||||||
30000,
|
60000, // 60 seconds before aborting
|
||||||
sGetAdd,
|
sGetAdd,
|
||||||
bSilent ? [] : ['MessageList']
|
bSilent ? [] : ['MessageList']
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -171,8 +171,8 @@ MessagelistUserStore.reload = (bDropPagePosition = false, bDropCurrentFolderCach
|
||||||
if (iError) {
|
if (iError) {
|
||||||
if (Notification.RequestAborted !== iError) {
|
if (Notification.RequestAborted !== iError) {
|
||||||
MessagelistUserStore([]);
|
MessagelistUserStore([]);
|
||||||
MessagelistUserStore.error(getNotification(iError));
|
|
||||||
}
|
}
|
||||||
|
MessagelistUserStore.error(getNotification(iError) || oData.message);
|
||||||
} else {
|
} else {
|
||||||
const collection = MessageCollectionModel.reviveFromJson(oData.Result, bCached);
|
const collection = MessageCollectionModel.reviveFromJson(oData.Result, bCached);
|
||||||
if (collection) {
|
if (collection) {
|
||||||
|
|
@ -387,7 +387,7 @@ MessagelistUserStore.removeMessagesFromList = (
|
||||||
if (MessagelistUserStore.threadUid()) {
|
if (MessagelistUserStore.threadUid()) {
|
||||||
if (
|
if (
|
||||||
messageList.length &&
|
messageList.length &&
|
||||||
!!messageList.find(item => !!(item && item.deleted() && item.uid == MessagelistUserStore.threadUid()))
|
messageList.find(item => item && item.deleted() && item.uid == MessagelistUserStore.threadUid())
|
||||||
) {
|
) {
|
||||||
const message = messageList.find(item => item && !item.deleted());
|
const message = messageList.find(item => item && !item.deleted());
|
||||||
let setHash;
|
let setHash;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue