From 0e777c9f754a210f98ae912b2d6964e5e8498b4e Mon Sep 17 00:00:00 2001 From: Jack Date: Fri, 19 Nov 2021 12:55:49 +0000 Subject: [PATCH] playing error sound when enabled --- src/js/commandline-lists.js | 1 + src/js/settings.js | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/js/commandline-lists.js b/src/js/commandline-lists.js index 9d649fc11..d974e0fd4 100644 --- a/src/js/commandline-lists.js +++ b/src/js/commandline-lists.js @@ -636,6 +636,7 @@ let commandsSoundOnError = { configValue: true, exec: () => { UpdateConfig.setPlaySoundOnError(true); + Sound.playError(); }, }, ], diff --git a/src/js/settings.js b/src/js/settings.js index 622ed9c67..39acf6259 100644 --- a/src/js/settings.js +++ b/src/js/settings.js @@ -172,7 +172,10 @@ async function initGroups() { ); groups.playSoundOnError = new SettingsGroup( "playSoundOnError", - UpdateConfig.setPlaySoundOnError + UpdateConfig.setPlaySoundOnError, + () => { + if (Config.playSoundOnError) Sound.playError(); + } ); groups.playSoundOnClick = new SettingsGroup( "playSoundOnClick",