mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-01 13:39:22 +03:00
Cleanup .bind(
This commit is contained in:
parent
9ec84baa32
commit
29fe73d4e7
7 changed files with 143 additions and 246 deletions
|
|
@ -220,8 +220,6 @@ export const MessageUserStore = new class {
|
|||
}
|
||||
});
|
||||
|
||||
this.onMessageResponse = this.onMessageResponse.bind(this);
|
||||
|
||||
this.purgeMessageBodyCacheThrottle = this.purgeMessageBodyCache.throttle(30000);
|
||||
}
|
||||
|
||||
|
|
@ -630,27 +628,20 @@ export const MessageUserStore = new class {
|
|||
if (oMessage) {
|
||||
this.hideMessageBodies();
|
||||
this.messageLoading(true);
|
||||
Remote.message(this.onMessageResponse, oMessage.folder, oMessage.uid);
|
||||
Remote.message((iError, oData, bCached) => {
|
||||
if (iError) {
|
||||
if (Notification.RequestAborted !== iError) {
|
||||
this.message(null);
|
||||
this.messageError(getNotification(iError));
|
||||
}
|
||||
} else {
|
||||
this.setMessage(oData, bCached);
|
||||
}
|
||||
this.messageLoading(false);
|
||||
}, oMessage.folder, oMessage.uid);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {string} sResult
|
||||
* @param {FetchJsonDefaultResponse} oData
|
||||
* @param {boolean} bCached
|
||||
*/
|
||||
onMessageResponse(iError, oData, bCached) {
|
||||
if (iError) {
|
||||
if (Notification.RequestAborted !== iError) {
|
||||
this.message(null);
|
||||
this.messageError(getNotification(iError));
|
||||
}
|
||||
} else {
|
||||
this.setMessage(oData, bCached);
|
||||
}
|
||||
this.messageLoading(false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {Array} list
|
||||
* @returns {string}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue