Skip to content

Commit 83a5c13

Browse files
fix: pr reviews
1 parent 390cc71 commit 83a5c13

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

FlowCrypt/Functionality/Services/Folders Manager/RemoteFoldersApiClient/GmailService+folders.swift

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,11 @@ extension GmailService: RemoteFoldersApiClient {
3131
guard let labels = listLabels.labels else {
3232
return continuation.resume(throwing: GmailApiError.failedToParseData(data))
3333
}
34+
let excludedStarLabels: Set<String> = [
35+
"BLUE_STAR", "GREEN_STAR", "ORANGE_STAR", "PURPLE_STAR", "RED_STAR", "YELLOW_STAR",
36+
"BLUE_CIRCLE", "GREEN_CIRCLE", "ORANGE_CIRCLE", "PURPLE_CIRCLE", "RED_CIRCLE", "YELLOW_CIRCLE"
37+
]
38+
// https://github.com/FlowCrypt/flowcrypt-ios/pull/2682#discussion_r2273028511
3439
let folders = labels
3540
.compactMap { [weak self] label -> GTLRGmail_Label? in
3641
guard let identifier = label.identifier, identifier.isNotEmpty else {
@@ -44,7 +49,7 @@ extension GmailService: RemoteFoldersApiClient {
4449
return label
4550
}
4651
.compactMap(Folder.init)
47-
.filter { $0.name != "YELLOW_STAR" }
52+
.filter { !excludedStarLabels.contains($0.name) }
4853

4954
return continuation.resume(returning: folders + [Constants.allMailFolder])
5055
}

0 commit comments

Comments
 (0)