refactor: Centralize notification definitions
This commit is contained in:
parent
b9fad57d3e
commit
41cfc2eca3
@ -144,6 +144,3 @@ class WindowDelegate: NSObject, NSWindowDelegate {
|
||||
}
|
||||
}
|
||||
|
||||
extension Notification.Name {
|
||||
static let navigateToDestination = Notification.Name("navigateToDestination")
|
||||
}
|
||||
|
||||
@ -175,9 +175,6 @@ class LicenseViewModel: ObservableObject {
|
||||
}
|
||||
}
|
||||
|
||||
extension Notification.Name {
|
||||
static let licenseStatusChanged = Notification.Name("licenseStatusChanged")
|
||||
}
|
||||
|
||||
// Add UserDefaults extensions for storing activation ID
|
||||
extension UserDefaults {
|
||||
|
||||
@ -2,4 +2,11 @@ import Foundation
|
||||
|
||||
extension Notification.Name {
|
||||
static let AppSettingsDidChange = Notification.Name("appSettingsDidChange")
|
||||
static let languageDidChange = Notification.Name("languageDidChange")
|
||||
static let promptDidChange = Notification.Name("promptDidChange")
|
||||
static let toggleMiniRecorder = Notification.Name("toggleMiniRecorder")
|
||||
static let didChangeModel = Notification.Name("didChangeModel")
|
||||
static let aiProviderKeyChanged = Notification.Name("aiProviderKeyChanged")
|
||||
static let licenseStatusChanged = Notification.Name("licenseStatusChanged")
|
||||
static let navigateToDestination = Notification.Name("navigateToDestination")
|
||||
}
|
||||
|
||||
@ -541,7 +541,4 @@ class AIService: ObservableObject {
|
||||
}
|
||||
}
|
||||
|
||||
extension Notification.Name {
|
||||
static let aiProviderKeyChanged = Notification.Name("aiProviderKeyChanged")
|
||||
}
|
||||
|
||||
|
||||
@ -1,9 +1,5 @@
|
||||
import Foundation
|
||||
|
||||
extension Notification.Name {
|
||||
static let languageDidChange = Notification.Name("languageDidChange")
|
||||
static let promptDidChange = Notification.Name("promptDidChange")
|
||||
}
|
||||
|
||||
@MainActor
|
||||
class WhisperPrompt: ObservableObject {
|
||||
|
||||
@ -428,7 +428,3 @@ class WhisperState: NSObject, ObservableObject {
|
||||
}
|
||||
}
|
||||
|
||||
extension Notification.Name {
|
||||
static let toggleMiniRecorder = Notification.Name("toggleMiniRecorder")
|
||||
static let didChangeModel = Notification.Name("didChangeModel")
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user