diff --git a/package.json b/package.json index bb5e2491..37bef935 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "electron-mail", "description": "Unofficial ProtonMail Desktop App", - "version": "5.2.2", + "version": "5.2.3", "author": "Vladimir Yakovlev ", "license": "GPL-3.0", "homepage": "https://github.com/vladimiry/ElectronMail", diff --git a/src/electron-main/database/util.ts b/src/electron-main/database/util.ts index a7e5f187..18334e74 100644 --- a/src/electron-main/database/util.ts +++ b/src/electron-main/database/util.ts @@ -39,6 +39,7 @@ const resolveAccountFolders: resolveAccountFoldersType = ( // this folder should not affect the combined "unread" state calculation // so "notify" should be set to 0/disabled since otherwise desktop notifications will always be displayed SYSTEM_FOLDER_IDENTIFIERS["All Mail"], + SYSTEM_FOLDER_IDENTIFIERS["Almost All Mail"], ]; return (account, includingSpam) => [ ...Object.values(account.folders), diff --git a/src/electron-preload/webview/primary/api/index.ts b/src/electron-preload/webview/primary/api/index.ts index 3c3e53fa..896bacc0 100644 --- a/src/electron-preload/webview/primary/api/index.ts +++ b/src/electron-preload/webview/primary/api/index.ts @@ -63,8 +63,10 @@ export function registerApi(providerApi: ProviderApi): void { {system: [], custom: []}, ); const {id: mailId, conversationEntryPk: conversationId} = input.mail; - const [systemFolderId = systemMailFolderIds[0] /* falling back to first value if no other than "all mail" folder resolved */] - = systemMailFolderIds.filter((id) => id !== SYSTEM_FOLDER_IDENTIFIERS["All Mail"]); + // falling back to first value if no other than "all mail" folder resolved + const [systemFolderId = systemMailFolderIds[0]] = systemMailFolderIds.filter((id) => { + return id !== SYSTEM_FOLDER_IDENTIFIERS["All Mail"] && id !== SYSTEM_FOLDER_IDENTIFIERS["Almost All Mail"]; + }); // TODO resolve "folder.id" value from the folder that contains a minimum items count // so narrowest result if multiple items resolved (so protonmail will have to load less data, pagination thing) const folderId: string | undefined = diff --git a/src/shared/model/database/constants.ts b/src/shared/model/database/constants.ts index f12cca3b..6322a191 100644 --- a/src/shared/model/database/constants.ts +++ b/src/shared/model/database/constants.ts @@ -10,6 +10,7 @@ export const SYSTEM_FOLDER_IDENTIFIERS = buildEnumBundle({ Trash: "3", Spam: "4", ["All Mail"]: "5", + ["Almost All Mail"]: "15", Starred: "10", Archive: "6", Sent: "7", diff --git a/src/web/browser-window/app/_db-view/db-view-mails-search.component.ts b/src/web/browser-window/app/_db-view/db-view-mails-search.component.ts index 51344d56..f736d602 100644 --- a/src/web/browser-window/app/_db-view/db-view-mails-search.component.ts +++ b/src/web/browser-window/app/_db-view/db-view-mails-search.component.ts @@ -98,6 +98,7 @@ export class DbViewMailsSearchComponent extends DbViewAbstractComponent implemen private readonly defaultUncheckedFolderIds: ReadonlySet> = new Set([ SYSTEM_FOLDER_IDENTIFIERS["Virtual Unread"], SYSTEM_FOLDER_IDENTIFIERS["All Mail"], + SYSTEM_FOLDER_IDENTIFIERS["Almost All Mail"], SYSTEM_FOLDER_IDENTIFIERS.Spam, ]); diff --git a/src/web/browser-window/app/_db-view/db-view-mails.component.ts b/src/web/browser-window/app/_db-view/db-view-mails.component.ts index 1ff353f9..9210f78d 100644 --- a/src/web/browser-window/app/_db-view/db-view-mails.component.ts +++ b/src/web/browser-window/app/_db-view/db-view-mails.component.ts @@ -159,6 +159,7 @@ export class DbViewMailsComponent extends DbViewAbstractComponent implements OnI SYSTEM_FOLDER_IDENTIFIERS["All Drafts"], SYSTEM_FOLDER_IDENTIFIERS["All Sent"], SYSTEM_FOLDER_IDENTIFIERS["All Mail"], + SYSTEM_FOLDER_IDENTIFIERS["Almost All Mail"], SYSTEM_FOLDER_IDENTIFIERS.Search, SYSTEM_FOLDER_IDENTIFIERS.Label, ]);