diff --git a/VoiceInk/MediaController.swift b/VoiceInk/MediaController.swift index 5e73794..34a133e 100644 --- a/VoiceInk/MediaController.swift +++ b/VoiceInk/MediaController.swift @@ -18,10 +18,7 @@ class MediaController: ObservableObject { } } - @Published var audioResumptionDelay: Double = { - let value = UserDefaults.standard.double(forKey: "audioResumptionDelay") - return value < 1.0 ? 1.0 : value - }() { + @Published var audioResumptionDelay: Double = UserDefaults.standard.double(forKey: "audioResumptionDelay") { didSet { UserDefaults.standard.set(audioResumptionDelay, forKey: "audioResumptionDelay") } @@ -33,9 +30,7 @@ class MediaController: ObservableObject { } if !UserDefaults.standard.contains(key: "audioResumptionDelay") { - UserDefaults.standard.set(1.0, forKey: "audioResumptionDelay") - } else if audioResumptionDelay < 1.0 { - audioResumptionDelay = 1.0 + UserDefaults.standard.set(0.0, forKey: "audioResumptionDelay") } } diff --git a/VoiceInk/Views/Settings/ExperimentalFeaturesSection.swift b/VoiceInk/Views/Settings/ExperimentalFeaturesSection.swift index 80c164b..c30f5af 100644 --- a/VoiceInk/Views/Settings/ExperimentalFeaturesSection.swift +++ b/VoiceInk/Views/Settings/ExperimentalFeaturesSection.swift @@ -47,11 +47,12 @@ struct ExperimentalFeaturesSection: View { expandedSections: $expandedSections ) { HStack(spacing: 8) { - Text("Resumption Delay") + Text("Resume Delay") .font(.system(size: 13, weight: .medium)) .foregroundColor(.secondary) Picker("", selection: $mediaController.audioResumptionDelay) { + Text("0s").tag(0.0) Text("1s").tag(1.0) Text("2s").tag(2.0) Text("3s").tag(3.0) @@ -62,8 +63,8 @@ struct ExperimentalFeaturesSection: View { .frame(width: 80) InfoTip( - title: "Audio Resumption Delay", - message: "Delay before resuming media playback after recording stops. Useful for Bluetooth headphones that need time to switch from microphone mode back to high-quality audio mode. Recommended: 2s for AirPods/Bluetooth headphones, 1s for wired headphones." + title: "Audio Resume Delay", + message: "Delay before resuming media playback after recording stops. Useful for Bluetooth headphones that need time to switch from microphone mode back to high-quality audio mode. Recommended: 2s for AirPods/Bluetooth headphones, 0s for wired headphones." ) Spacer() diff --git a/VoiceInk/Views/Settings/SettingsView.swift b/VoiceInk/Views/Settings/SettingsView.swift index 0173ff7..54b31f0 100644 --- a/VoiceInk/Views/Settings/SettingsView.swift +++ b/VoiceInk/Views/Settings/SettingsView.swift @@ -221,11 +221,12 @@ struct SettingsView: View { expandedSections: $expandedSections ) { HStack(spacing: 8) { - Text("Resumption Delay") + Text("Resume Delay") .font(.system(size: 13, weight: .medium)) .foregroundColor(.secondary) Picker("", selection: $mediaController.audioResumptionDelay) { + Text("0s").tag(0.0) Text("1s").tag(1.0) Text("2s").tag(2.0) Text("3s").tag(3.0) @@ -236,8 +237,8 @@ struct SettingsView: View { .frame(width: 80) InfoTip( - title: "Audio Resumption Delay", - message: "Delay before unmuting system audio after recording stops. Useful for Bluetooth headphones that need time to switch from microphone mode back to high-quality audio mode. Recommended: 2s for AirPods/Bluetooth headphones, 1s for wired headphones." + title: "Audio Resume Delay", + message: "Delay before unmuting system audio after recording stops. Useful for Bluetooth headphones that need time to switch from microphone mode back to high-quality audio mode. Recommended: 2s for AirPods/Bluetooth headphones, 0s for wired headphones." ) Spacer()