playing error sound when enabled

This commit is contained in:
Jack 2021-11-19 12:55:49 +00:00
parent ecb11e0f9d
commit 0e777c9f75
2 changed files with 5 additions and 1 deletions

View file

@ -636,6 +636,7 @@ let commandsSoundOnError = {
configValue: true,
exec: () => {
UpdateConfig.setPlaySoundOnError(true);
Sound.playError();
},
},
],

View file

@ -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",