Remove fallback window functionality references
This commit is contained in:
parent
269d855981
commit
8f7411d377
@ -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)
|
||||
}
|
||||
|
||||
@ -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")
|
||||
|
||||
@ -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)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user