diff --git a/VoiceInk/Views/Settings/SettingsView.swift b/VoiceInk/Views/Settings/SettingsView.swift index 0a7a11b..41a1efd 100644 --- a/VoiceInk/Views/Settings/SettingsView.swift +++ b/VoiceInk/Views/Settings/SettingsView.swift @@ -15,6 +15,7 @@ struct SettingsView: View { @ObservedObject private var playbackController = PlaybackController.shared @AppStorage("hasCompletedOnboarding") private var hasCompletedOnboarding = true @AppStorage("autoUpdateCheck") private var autoUpdateCheck = true + @AppStorage("enableAnnouncements") private var enableAnnouncements = true @State private var showResetOnboardingAlert = false @State private var currentShortcut = KeyboardShortcuts.getShortcut(for: .toggleMiniRecorder) @State private var isCustomCancelEnabled = false @@ -297,6 +298,16 @@ struct SettingsView: View { updaterViewModel.toggleAutoUpdates(newValue) } + Toggle("Show app announcements", isOn: $enableAnnouncements) + .toggleStyle(.switch) + .onChange(of: enableAnnouncements) { _, newValue in + if newValue { + AnnouncementsService.shared.start() + } else { + AnnouncementsService.shared.stop() + } + } + Button("Check for Updates Now") { updaterViewModel.checkForUpdates() } diff --git a/VoiceInk/VoiceInk.swift b/VoiceInk/VoiceInk.swift index af22cfd..6df9cce 100644 --- a/VoiceInk/VoiceInk.swift +++ b/VoiceInk/VoiceInk.swift @@ -18,6 +18,7 @@ struct VoiceInkApp: App { @StateObject private var enhancementService: AIEnhancementService @StateObject private var activeWindowService = ActiveWindowService.shared @AppStorage("hasCompletedOnboarding") private var hasCompletedOnboarding = false + @AppStorage("enableAnnouncements") private var enableAnnouncements = true // Audio cleanup manager for automatic deletion of old audio files private let audioCleanupManager = AudioCleanupManager.shared @@ -105,7 +106,9 @@ struct VoiceInkApp: App { .modelContainer(container) .onAppear { updaterViewModel.silentlyCheckForUpdates() - AnnouncementsService.shared.start() + if enableAnnouncements { + AnnouncementsService.shared.start() + } // Start the transcription auto-cleanup service (handles immediate and scheduled transcript deletion) transcriptionAutoCleanupService.startMonitoring(modelContext: container.mainContext)