From 9016f885f463b9e647de874808ab56afdd54706e Mon Sep 17 00:00:00 2001 From: Beingpax Date: Sun, 13 Jul 2025 10:39:54 +0545 Subject: [PATCH] Improve recording failure handling --- VoiceInk/Whisper/WhisperState.swift | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/VoiceInk/Whisper/WhisperState.swift b/VoiceInk/Whisper/WhisperState.swift index 47ba896..c7a2c6c 100644 --- a/VoiceInk/Whisper/WhisperState.swift +++ b/VoiceInk/Whisper/WhisperState.swift @@ -190,9 +190,8 @@ class WhisperState: NSObject, ObservableObject { } catch { self.logger.error("❌ Failed to start recording: \(error.localizedDescription)") - await MainActor.run { - self.recordingState = .idle - } + await NotificationManager.shared.showNotification(title: "Recording failed to start", type: .error) + await self.dismissMiniRecorder() // Do not remove the file on a failed start, to preserve all recordings. self.recordedFile = nil }