Skip to content

Commit 342ab60

Browse files
committed
Rename WindowsController to WidgetWindowsController
1 parent 098e7e3 commit 342ab60

4 files changed

Lines changed: 8 additions & 8 deletions

File tree

Core/Sources/SuggestionWidget/FeatureReducers/WidgetFeature.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ public struct WidgetFeature: ReducerProtocol {
111111
case circularWidget(CircularWidgetFeature.Action)
112112
}
113113

114-
var windowsController: WindowsController? {
114+
var windowsController: WidgetWindowsController? {
115115
suggestionWidgetControllerDependency.windowsController
116116
}
117117

Core/Sources/SuggestionWidget/ModuleDependency.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ public final class SuggestionWidgetControllerDependency {
1313
public var suggestionWidgetDataSource: SuggestionWidgetDataSource?
1414
public var onOpenChatClicked: () -> Void = {}
1515
public var onCustomCommandClicked: (CustomCommand) -> Void = { _ in }
16-
var windowsController: WindowsController?
16+
var windowsController: WidgetWindowsController?
1717

1818
public init() {}
1919
}

Core/Sources/SuggestionWidget/SuggestionWidgetController.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ public final class SuggestionWidgetController: NSObject {
1414
let store: StoreOf<WidgetFeature>
1515
let viewStore: ViewStoreOf<WidgetFeature>
1616
let chatTabPool: ChatTabPool
17-
let windowsController: WindowsController
17+
let windowsController: WidgetWindowsController
1818
private var cancellable = Set<AnyCancellable>()
1919

2020
public let dependency: SuggestionWidgetControllerDependency

Core/Sources/SuggestionWidget/WindowsController.swift renamed to Core/Sources/SuggestionWidget/WidgetWindowsController.swift

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import Foundation
88
import SwiftUI
99
import XcodeInspector
1010

11-
final class WindowsController: NSObject {
11+
final class WidgetWindowsController: NSObject {
1212
let userDefaultsObservers = WidgetUserDefaultsObservers()
1313
var xcodeInspector: XcodeInspector { .shared }
1414

@@ -192,7 +192,7 @@ final class WindowsController: NSObject {
192192
}
193193
}
194194

195-
extension WindowsController: NSWindowDelegate {
195+
extension WidgetWindowsController: NSWindowDelegate {
196196
func windowWillMove(_ notification: Notification) {
197197
guard (notification.object as? NSWindow) === windows.chatPanelWindow else { return }
198198
Task { @MainActor in
@@ -218,7 +218,7 @@ extension WindowsController: NSWindowDelegate {
218218
}
219219
}
220220

221-
private extension WindowsController {
221+
private extension WidgetWindowsController {
222222
func activate(_ app: AppInstanceInspector) {
223223
guard currentApplicationProcessIdentifier != app.processIdentifier else { return }
224224
currentApplicationProcessIdentifier = app.processIdentifier
@@ -310,7 +310,7 @@ private extension WindowsController {
310310
}
311311
}
312312

313-
extension WindowsController {
313+
extension WidgetWindowsController {
314314
@MainActor
315315
func hidePanelWindows() {
316316
windows.sharedPanelWindow.alphaValue = 0
@@ -423,7 +423,7 @@ extension WindowsController {
423423
public final class WidgetWindows {
424424
let store: StoreOf<WidgetFeature>
425425
let chatTabPool: ChatTabPool
426-
weak var controller: WindowsController?
426+
weak var controller: WidgetWindowsController?
427427

428428
// you should make these window `.transient` so they never show up in the mission control.
429429

0 commit comments

Comments
 (0)