mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-01 13:39:22 +03:00
Remove most DoFolders loops as they are not used.
And move system folder detection/autocreate to MailboxDetectPlugin because it is hardly used. And by using mailbox.role the default system folder detection is only using (IMAP and JMAP) RFC standards.
This commit is contained in:
parent
8799cd3e8d
commit
54896bf044
18 changed files with 419 additions and 468 deletions
|
|
@ -117,7 +117,7 @@ FolderUserStore = new class {
|
|||
|
||||
const
|
||||
subscribeRemoveSystemFolder = observable => {
|
||||
observable.subscribe(() => getFolderFromCacheList(observable())?.type(FolderType.User), self, 'beforeChange');
|
||||
observable.subscribe(() => getFolderFromCacheList(observable())?.type(0), self, 'beforeChange');
|
||||
},
|
||||
fSetSystemFolderType = type => value => getFolderFromCacheList(value)?.type(type);
|
||||
|
||||
|
|
@ -130,7 +130,7 @@ FolderUserStore = new class {
|
|||
addSubscribablesTo(self, {
|
||||
sentFolder: fSetSystemFolderType(FolderType.Sent),
|
||||
draftsFolder: fSetSystemFolderType(FolderType.Drafts),
|
||||
spamFolder: fSetSystemFolderType(FolderType.Spam),
|
||||
spamFolder: fSetSystemFolderType(FolderType.Junk),
|
||||
trashFolder: fSetSystemFolderType(FolderType.Trash),
|
||||
archiveFolder: fSetSystemFolderType(FolderType.Archive)
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue