diff --git a/FlowCrypt/Functionality/Services/Folders Manager/RemoteFoldersApiClient/GmailService+folders.swift b/FlowCrypt/Functionality/Services/Folders Manager/RemoteFoldersApiClient/GmailService+folders.swift index d94893505..b98515551 100644 --- a/FlowCrypt/Functionality/Services/Folders Manager/RemoteFoldersApiClient/GmailService+folders.swift +++ b/FlowCrypt/Functionality/Services/Folders Manager/RemoteFoldersApiClient/GmailService+folders.swift @@ -31,6 +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" + ] let folders = labels .compactMap { [weak self] label -> GTLRGmail_Label? in guard let identifier = label.identifier, identifier.isNotEmpty else { @@ -44,6 +50,7 @@ extension GmailService: RemoteFoldersApiClient { return label } .compactMap(Folder.init) + .filter { !excludedStarLabels.contains($0.name) } return continuation.resume(returning: folders + [Constants.allMailFolder]) }