From 30d021fa70887cb9f15dce907f7facf3709c6c13 Mon Sep 17 00:00:00 2001 From: Antoine Aflalo Date: Sat, 8 May 2021 17:21:31 -0400 Subject: [PATCH] fix(Microphone::Mute): Stop telling user that the microphone mute hotkey couldn't be registered This happens so often, this will disable the feature automatically instead. --- SoundSwitch/Model/AppModel.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/SoundSwitch/Model/AppModel.cs b/SoundSwitch/Model/AppModel.cs index 79f6104740..50aea51946 100644 --- a/SoundSwitch/Model/AppModel.cs +++ b/SoundSwitch/Model/AppModel.cs @@ -225,7 +225,11 @@ public void InitializeMain() ProfileManager = new ProfileManager(new WindowMonitor(), AudioSwitcher.Instance, ActiveAudioDeviceLister, TrayIcon.ShowError, new TriggerFactory(), _notificationManager); RegisterHotKey(AppConfigs.Configuration.PlaybackHotKey); RegisterHotKey(AppConfigs.Configuration.RecordingHotKey); - RegisterHotKey(AppConfigs.Configuration.MuteRecordingHotKey); + if (!RegisterHotKey(AppConfigs.Configuration.MuteRecordingHotKey)) + { + AppConfigs.Configuration.MuteRecordingHotKey.Enabled = false; + AppConfigs.Configuration.Save(); + } WindowsAPIAdapter.HotKeyPressed += HandleHotkeyPress;