Skip to content

Commit 420191e

Browse files
committed
Remove the meaningless Task { @mainactor in } in initializer
1 parent 3fc5ba7 commit 420191e

1 file changed

Lines changed: 0 additions & 8 deletions

File tree

Core/Sources/SuggestionWidget/SuggestionWidgetController.swift

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -229,9 +229,7 @@ public final class SuggestionWidgetController: NSObject {
229229
}
230230
}
231231
}
232-
}
233232

234-
Task { @MainActor in
235233
fullscreenDetectingTask = Task { [weak self] in
236234
let sequence = NSWorkspace.shared.notificationCenter
237235
.notifications(named: NSWorkspace.activeSpaceDidChangeNotification)
@@ -247,26 +245,20 @@ public final class SuggestionWidgetController: NSObject {
247245
}
248246
}
249247
}
250-
}
251248

252-
Task { @MainActor in
253249
presentationModeChangeObserver.onChange = { [weak self] in
254250
guard let self else { return }
255251
self.updateWindowLocation()
256252
}
257-
}
258253

259-
Task { @MainActor in
260254
chatWindowViewModel.$chatPanelInASeparateWindow.dropFirst().removeDuplicates()
261255
.sink { [weak self] _ in
262256
guard let self else { return }
263257
Task { @MainActor in
264258
self.updateWindowLocation(animated: true)
265259
}
266260
}.store(in: &cancellable)
267-
}
268261

269-
Task { @MainActor in
270262
let updateColorScheme = { @MainActor [weak self] in
271263
guard let self else { return }
272264
let widgetColorScheme = UserDefaults.shared.value(for: \.widgetColorScheme)

0 commit comments

Comments
 (0)