From 390cc7137889400708cc914f66517d312ade62f5 Mon Sep 17 00:00:00 2001 From: Ioan Moldovan Date: Tue, 12 Aug 2025 06:18:16 -0700 Subject: [PATCH 1/3] fix: hide yellow star label --- .../RemoteFoldersApiClient/GmailService+folders.swift | 1 + 1 file changed, 1 insertion(+) diff --git a/FlowCrypt/Functionality/Services/Folders Manager/RemoteFoldersApiClient/GmailService+folders.swift b/FlowCrypt/Functionality/Services/Folders Manager/RemoteFoldersApiClient/GmailService+folders.swift index d94893505..0463df413 100644 --- a/FlowCrypt/Functionality/Services/Folders Manager/RemoteFoldersApiClient/GmailService+folders.swift +++ b/FlowCrypt/Functionality/Services/Folders Manager/RemoteFoldersApiClient/GmailService+folders.swift @@ -44,6 +44,7 @@ extension GmailService: RemoteFoldersApiClient { return label } .compactMap(Folder.init) + .filter { $0.name != "YELLOW_STAR" } return continuation.resume(returning: folders + [Constants.allMailFolder]) } From 83a5c13bd50e7291af545eb88bfbcef71863ad14 Mon Sep 17 00:00:00 2001 From: Ioan Moldovan Date: Thu, 14 Aug 2025 02:04:03 -0700 Subject: [PATCH 2/3] fix: pr reviews --- .../RemoteFoldersApiClient/GmailService+folders.swift | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/FlowCrypt/Functionality/Services/Folders Manager/RemoteFoldersApiClient/GmailService+folders.swift b/FlowCrypt/Functionality/Services/Folders Manager/RemoteFoldersApiClient/GmailService+folders.swift index 0463df413..53b3143f3 100644 --- a/FlowCrypt/Functionality/Services/Folders Manager/RemoteFoldersApiClient/GmailService+folders.swift +++ b/FlowCrypt/Functionality/Services/Folders Manager/RemoteFoldersApiClient/GmailService+folders.swift @@ -31,6 +31,11 @@ extension GmailService: RemoteFoldersApiClient { guard let labels = listLabels.labels else { return continuation.resume(throwing: GmailApiError.failedToParseData(data)) } + let excludedStarLabels: Set = [ + "BLUE_STAR", "GREEN_STAR", "ORANGE_STAR", "PURPLE_STAR", "RED_STAR", "YELLOW_STAR", + "BLUE_CIRCLE", "GREEN_CIRCLE", "ORANGE_CIRCLE", "PURPLE_CIRCLE", "RED_CIRCLE", "YELLOW_CIRCLE" + ] + // https://github.com/FlowCrypt/flowcrypt-ios/pull/2682#discussion_r2273028511 let folders = labels .compactMap { [weak self] label -> GTLRGmail_Label? in guard let identifier = label.identifier, identifier.isNotEmpty else { @@ -44,7 +49,7 @@ extension GmailService: RemoteFoldersApiClient { return label } .compactMap(Folder.init) - .filter { $0.name != "YELLOW_STAR" } + .filter { !excludedStarLabels.contains($0.name) } return continuation.resume(returning: folders + [Constants.allMailFolder]) } From 3c7d74b74b55629083ad10d28029c5faffee7b54 Mon Sep 17 00:00:00 2001 From: Ioan Moldovan Date: Thu, 14 Aug 2025 02:05:09 -0700 Subject: [PATCH 3/3] fix: comment --- .../RemoteFoldersApiClient/GmailService+folders.swift | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/FlowCrypt/Functionality/Services/Folders Manager/RemoteFoldersApiClient/GmailService+folders.swift b/FlowCrypt/Functionality/Services/Folders Manager/RemoteFoldersApiClient/GmailService+folders.swift index 53b3143f3..b98515551 100644 --- a/FlowCrypt/Functionality/Services/Folders Manager/RemoteFoldersApiClient/GmailService+folders.swift +++ b/FlowCrypt/Functionality/Services/Folders Manager/RemoteFoldersApiClient/GmailService+folders.swift @@ -31,11 +31,12 @@ extension GmailService: RemoteFoldersApiClient { guard let labels = listLabels.labels else { return continuation.resume(throwing: GmailApiError.failedToParseData(data)) } + // Exculde star labels + // https://github.com/FlowCrypt/flowcrypt-ios/pull/2682#discussion_r2273028511 let excludedStarLabels: Set = [ "BLUE_STAR", "GREEN_STAR", "ORANGE_STAR", "PURPLE_STAR", "RED_STAR", "YELLOW_STAR", "BLUE_CIRCLE", "GREEN_CIRCLE", "ORANGE_CIRCLE", "PURPLE_CIRCLE", "RED_CIRCLE", "YELLOW_CIRCLE" ] - // https://github.com/FlowCrypt/flowcrypt-ios/pull/2682#discussion_r2273028511 let folders = labels .compactMap { [weak self] label -> GTLRGmail_Label? in guard let identifier = label.identifier, identifier.isNotEmpty else {