mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-29 20:19:22 +03:00
foldersReload promises populator to the new FolderCollectionModel
This commit is contained in:
parent
d33f9710c2
commit
8f07cf4ac6
5 changed files with 182 additions and 192 deletions
|
|
@ -1,5 +1,4 @@
|
|||
import { pString, pInt } from 'Common/Utils';
|
||||
import PromisesPopulator from 'Promises/User/Populator';
|
||||
|
||||
import {
|
||||
CONTACTS_SYNC_AJAX_TIMEOUT,
|
||||
|
|
@ -24,6 +23,8 @@ import SettingsStore from 'Stores/User/Settings';
|
|||
|
||||
import { AbstractFetchRemote } from 'Remote/AbstractFetch';
|
||||
|
||||
import { FolderCollectionModel } from 'Model/FolderCollection';
|
||||
|
||||
//const toUTF8 = window.TextEncoder
|
||||
// ? text => String.fromCharCode(...new TextEncoder().encode(text))
|
||||
// : text => unescape(encodeURIComponent(text)),
|
||||
|
|
@ -773,9 +774,9 @@ class RemoteUserFetch extends AbstractFetchRemote {
|
|||
foldersReload(fTrigger) {
|
||||
return this.abort('Folders')
|
||||
.postRequest('Folders', fTrigger)
|
||||
.then((data) => {
|
||||
PromisesPopulator.foldersList(data.Result);
|
||||
PromisesPopulator.foldersAdditionalParameters(data.Result);
|
||||
.then(data => {
|
||||
data = FolderCollectionModel.reviveFromJson(data.Result);
|
||||
data && data.storeIt();
|
||||
return true;
|
||||
});
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue