From 34fada2b26b652d4570ea5d81cdeb3f230b1eae3 Mon Sep 17 00:00:00 2001 From: Beingpax Date: Sun, 2 Mar 2025 17:49:23 +0545 Subject: [PATCH] fix: preserve enhancement settings when power mode is disabled - Remove forced disabling of enhancement, add early return to skip configuration application, maintain user's existing settings --- VoiceInk/Services/ActiveWindowService.swift | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/VoiceInk/Services/ActiveWindowService.swift b/VoiceInk/Services/ActiveWindowService.swift index c53340b..f6e2680 100644 --- a/VoiceInk/Services/ActiveWindowService.swift +++ b/VoiceInk/Services/ActiveWindowService.swift @@ -14,6 +14,12 @@ class ActiveWindowService: ObservableObject { } func applyConfigurationForCurrentApp() async { + // If power mode is disabled, don't do anything + guard PowerModeManager.shared.isPowerModeEnabled else { + print("🔌 Power Mode is disabled globally - skipping configuration application") + return + } + guard let frontmostApp = NSWorkspace.shared.frontmostApplication, let bundleIdentifier = frontmostApp.bundleIdentifier else { return } @@ -77,9 +83,8 @@ class ActiveWindowService: ObservableObject { } } } else { - // If power mode is disabled globally, disable AI enhancement - enhancementService.isEnhancementEnabled = false - print("🔌 Power Mode is disabled globally") + print("🔌 Power Mode is disabled globally - skipping configuration application") + return } } }