Skip to content

Commit 163f8d5

Browse files
committed
Update the dependency to hold a WindowsController instead
1 parent 3c9dfc4 commit 163f8d5

File tree

1 file changed

+1
-22
lines changed

1 file changed

+1
-22
lines changed

Core/Sources/SuggestionWidget/ModuleDependency.swift

Lines changed: 1 addition & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -13,32 +13,11 @@ public final class SuggestionWidgetControllerDependency {
1313
public var suggestionWidgetDataSource: SuggestionWidgetDataSource?
1414
public var onOpenChatClicked: () -> Void = {}
1515
public var onCustomCommandClicked: (CustomCommand) -> Void = { _ in }
16-
public var windows: WidgetWindows = .init()
16+
var windowsController: WindowsController?
1717

1818
public init() {}
1919
}
2020

21-
@MainActor
22-
public final class WidgetWindows {
23-
var fullscreenDetector: NSWindow!
24-
var widgetWindow: NSWindow!
25-
var sharedPanelWindow: NSWindow!
26-
var suggestionPanelWindow: NSWindow!
27-
var chatPanelWindow: ChatWindow!
28-
var toastWindow: NSWindow!
29-
30-
nonisolated
31-
init() {}
32-
33-
func orderFront() {
34-
widgetWindow?.orderFrontRegardless()
35-
toastWindow?.orderFrontRegardless()
36-
sharedPanelWindow?.orderFrontRegardless()
37-
suggestionPanelWindow?.orderFrontRegardless()
38-
chatPanelWindow?.orderFrontRegardless()
39-
}
40-
}
41-
4221
public final class WidgetUserDefaultsObservers {
4322
let presentationModeChangeObserver = UserDefaultsObserver(
4423
object: UserDefaults.shared,

0 commit comments

Comments
 (0)