From 0e930c519ceba645c54c9b038b8923ed0ef4b8c4 Mon Sep 17 00:00:00 2001 From: Beingpax Date: Thu, 7 Aug 2025 01:28:26 +0545 Subject: [PATCH] Add feedback for enhancement toggle --- VoiceInk/Notifications/AppNotifications.swift | 1 + VoiceInk/Services/AIEnhancementService.swift | 1 + VoiceInk/Views/Recorder/MiniWindowManager.swift | 7 +++++++ 3 files changed, 9 insertions(+) diff --git a/VoiceInk/Notifications/AppNotifications.swift b/VoiceInk/Notifications/AppNotifications.swift index ea37038..8a40a4c 100644 --- a/VoiceInk/Notifications/AppNotifications.swift +++ b/VoiceInk/Notifications/AppNotifications.swift @@ -12,4 +12,5 @@ extension Notification.Name { static let promptSelectionChanged = Notification.Name("promptSelectionChanged") static let powerModeConfigurationApplied = Notification.Name("powerModeConfigurationApplied") static let transcriptionCreated = Notification.Name("transcriptionCreated") + static let enhancementToggleChanged = Notification.Name("enhancementToggleChanged") } diff --git a/VoiceInk/Services/AIEnhancementService.swift b/VoiceInk/Services/AIEnhancementService.swift index 90269f1..0d880bc 100644 --- a/VoiceInk/Services/AIEnhancementService.swift +++ b/VoiceInk/Services/AIEnhancementService.swift @@ -18,6 +18,7 @@ class AIEnhancementService: ObservableObject { selectedPromptId = customPrompts.first?.id } NotificationCenter.default.post(name: .AppSettingsDidChange, object: nil) + NotificationCenter.default.post(name: .enhancementToggleChanged, object: nil) } } diff --git a/VoiceInk/Views/Recorder/MiniWindowManager.swift b/VoiceInk/Views/Recorder/MiniWindowManager.swift index 8656073..7e1c3b4 100644 --- a/VoiceInk/Views/Recorder/MiniWindowManager.swift +++ b/VoiceInk/Views/Recorder/MiniWindowManager.swift @@ -40,6 +40,13 @@ class MiniWindowManager: ObservableObject { name: .powerModeConfigurationApplied, object: nil ) + + NotificationCenter.default.addObserver( + self, + selector: #selector(handleFeedbackNotification), + name: .enhancementToggleChanged, + object: nil + ) } @objc private func handleHideNotification() {