diff --git a/VoiceInk/Services/ImportExportService.swift b/VoiceInk/Services/ImportExportService.swift index a640b88..bd279b1 100644 --- a/VoiceInk/Services/ImportExportService.swift +++ b/VoiceInk/Services/ImportExportService.swift @@ -18,7 +18,6 @@ struct GeneralSettings: Codable { let isAutoCopyEnabled: Bool? let isSoundFeedbackEnabled: Bool? let isSystemMuteEnabled: Bool? - let isFallbackWindowEnabled: Bool? let isTextFormattingEnabled: Bool? } @@ -94,7 +93,6 @@ class ImportExportService { isAutoCopyEnabled: whisperState.isAutoCopyEnabled, isSoundFeedbackEnabled: soundManager.isEnabled, isSystemMuteEnabled: mediaController.isSystemMuteEnabled, - isFallbackWindowEnabled: UserDefaults.standard.object(forKey: "isFallbackWindowEnabled") == nil ? true : UserDefaults.standard.bool(forKey: "isFallbackWindowEnabled"), isTextFormattingEnabled: UserDefaults.standard.object(forKey: keyIsTextFormattingEnabled) as? Bool ?? true ) @@ -250,9 +248,6 @@ class ImportExportService { if let muteSystem = general.isSystemMuteEnabled { mediaController.isSystemMuteEnabled = muteSystem } - if let fallbackEnabled = general.isFallbackWindowEnabled { - UserDefaults.standard.set(fallbackEnabled, forKey: "isFallbackWindowEnabled") - } if let textFormattingEnabled = general.isTextFormattingEnabled { UserDefaults.standard.set(textFormattingEnabled, forKey: self.keyIsTextFormattingEnabled) } diff --git a/VoiceInk/Views/Settings/SettingsView.swift b/VoiceInk/Views/Settings/SettingsView.swift index 05d9002..d1c3551 100644 --- a/VoiceInk/Views/Settings/SettingsView.swift +++ b/VoiceInk/Views/Settings/SettingsView.swift @@ -14,7 +14,6 @@ struct SettingsView: View { @StateObject private var deviceManager = AudioDeviceManager.shared @ObservedObject private var mediaController = MediaController.shared @AppStorage("hasCompletedOnboarding") private var hasCompletedOnboarding = true - @AppStorage("isFallbackWindowEnabled") private var isFallbackWindowEnabled = true @AppStorage("IsTextFormattingEnabled") private var isTextFormattingEnabled = true @State private var showResetOnboardingAlert = false @State private var currentShortcut = KeyboardShortcuts.getShortcut(for: .toggleMiniRecorder) @@ -96,12 +95,6 @@ struct SettingsView: View { } .toggleStyle(.switch) .help("Automatically mute system audio when recording starts and restore when recording stops") - - Toggle(isOn: $isFallbackWindowEnabled) { - Text("Show fallback window when paste fails") - } - .toggleStyle(.switch) - .help("Display a fallback window with the transcribed text when automatic pasting is not possible") Toggle(isOn: $isTextFormattingEnabled) { Text("Automatic text formatting") diff --git a/VoiceInk/Whisper/WhisperState.swift b/VoiceInk/Whisper/WhisperState.swift index a57d439..a4889a2 100644 --- a/VoiceInk/Whisper/WhisperState.swift +++ b/VoiceInk/Whisper/WhisperState.swift @@ -390,12 +390,6 @@ class WhisperState: NSObject, ObservableObject, AVAudioRecorderDelegate { if self.isAutoCopyEnabled { ClipboardManager.copyToClipboard(text) } - - if !PasteEligibilityService.isPastePossible() && (UserDefaults.standard.object(forKey: "isFallbackWindowEnabled") == nil ? true : UserDefaults.standard.bool(forKey: "isFallbackWindowEnabled")) { - DispatchQueue.main.asyncAfter(deadline: .now() + 0.1) { - TranscriptionFallbackManager.shared.showFallback(for: text) - } - } } try? FileManager.default.removeItem(at: url) @@ -495,12 +489,6 @@ class WhisperState: NSObject, ObservableObject, AVAudioRecorderDelegate { if self.isAutoCopyEnabled { ClipboardManager.copyToClipboard(textToPaste) } - - if !PasteEligibilityService.isPastePossible() && (UserDefaults.standard.object(forKey: "isFallbackWindowEnabled") == nil ? true : UserDefaults.standard.bool(forKey: "isFallbackWindowEnabled")) { - DispatchQueue.main.asyncAfter(deadline: .now() + 0.1) { - TranscriptionFallbackManager.shared.showFallback(for: textToPaste) - } - } } }