mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-07-11 00:14:50 +03:00
Code refactoring (promises for folders management)
This commit is contained in:
parent
9bec1d0a8f
commit
bab64a7cea
19 changed files with 467 additions and 333 deletions
|
|
@ -212,7 +212,11 @@
|
|||
this.viewThreads.trigger = ko.observable(false);
|
||||
|
||||
this.viewThreadMessages = ko.observableArray([]);
|
||||
this.viewThreadMessages.hash = '';
|
||||
this.viewThreadMessages.error = ko.observable('');
|
||||
|
||||
this.viewThreadMessages.subscribe(function () {
|
||||
this.viewThreadMessages.error('');
|
||||
}, this);
|
||||
|
||||
MessageStore.messageLastThreadUidsData.subscribe(function (oData) {
|
||||
if (oData && oData['Uids'])
|
||||
|
|
@ -320,11 +324,11 @@
|
|||
|
||||
self.viewThreadMessages(aList);
|
||||
|
||||
}, function (iErrorCode) {
|
||||
|
||||
window.alert(Translator.getNotification(iErrorCode));
|
||||
|
||||
});
|
||||
}).fail(function (iErrorCode) {
|
||||
self.viewThreadMessages([]);
|
||||
self.viewThreadMessages.error(Translator.getNotification(
|
||||
iErrorCode, '', Enums.Notification.CantGetMessageList));
|
||||
}).done();
|
||||
}
|
||||
|
||||
}, function () {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue