Cleanup and split Enums

This commit is contained in:
djmaze 2021-01-24 22:58:06 +01:00
parent 864da66b5f
commit f3bfa0e8c1
31 changed files with 315 additions and 344 deletions

View file

@ -2,7 +2,7 @@ import { AbstractCollectionModel } from 'Model/AbstractCollection';
import { UNUSED_OPTION_VALUE } from 'Common/Consts';
import { pInt } from 'Common/Utils';
import { ClientSideKeyName, FolderType, ServerFolderType } from 'Common/Enums';
import { ClientSideKeyName, FolderType } from 'Common/EnumsUser';
import * as Cache from 'Common/Cache';
import * as Local from 'Storage/Client';
@ -18,6 +18,18 @@ import Remote from 'Remote/User/Fetch';
const Settings = rl.settings,
ServerFolderType = {
USER: 0,
INBOX: 1,
SENT: 2,
DRAFTS: 3,
JUNK: 4,
TRASH: 5,
IMPORTANT: 10,
FLAGGED: 11,
ALL: 12
},
normalizeFolder = sFolderFullNameRaw => ('' === sFolderFullNameRaw
|| UNUSED_OPTION_VALUE === sFolderFullNameRaw
|| null !== Cache.getFolderFromCacheList(sFolderFullNameRaw))