File tree Expand file tree Collapse file tree
Application/DevLogData/Sources/Mapper Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -76,17 +76,18 @@ private func mergedTodoCategoryPreferences(
7676 _ preferences: [ TodoCategoryPreference ]
7777) -> [ TodoCategoryPreference ] {
7878 var mergedPreferences = preferences
79-
80- for systemTodoCategory in SystemTodoCategory . allCases {
81- let containsSystemTodoCategory = preferences. contains { preference in
82- guard case . system( let currentSystemTodoCategory) = preference. category else {
83- return false
79+ let existingSystemTodoCategories = Set < SystemTodoCategory > (
80+ preferences. compactMap { preference in
81+ guard case . system( let systemTodoCategory) = preference. category else {
82+ return nil
8483 }
8584
86- return currentSystemTodoCategory == systemTodoCategory
85+ return systemTodoCategory
8786 }
87+ )
8888
89- if containsSystemTodoCategory { continue }
89+ for systemTodoCategory in SystemTodoCategory . allCases {
90+ if existingSystemTodoCategories. contains ( systemTodoCategory) { continue }
9091
9192 mergedPreferences. append (
9293 TodoCategoryPreference (
You can’t perform that action at this time.
0 commit comments