diff --git a/src/components/SettingsDialog/SettingsDialog.vue b/src/components/SettingsDialog/SettingsDialog.vue index 93ddfda82d4..73936f0fd85 100644 --- a/src/components/SettingsDialog/SettingsDialog.vue +++ b/src/components/SettingsDialog/SettingsDialog.vue @@ -230,7 +230,7 @@ export default { this.playSoundsLoading = true try { try { - await this.$store.dispatch('setPlaySounds', status) + await this.$store.dispatch('setPlaySounds', !this.playSounds) } catch (e) { showError(t('spreed', 'Failed to save sounds setting')) } diff --git a/src/store/soundsStore.js b/src/store/soundsStore.js index cf295b57a50..baff79a8c96 100644 --- a/src/store/soundsStore.js +++ b/src/store/soundsStore.js @@ -74,7 +74,7 @@ const actions = { * @param {boolean} enabled Whether sounds should be played */ async setPlaySounds(context, enabled) { - await setPlaySounds(!context.state.userId, status) + await setPlaySounds(!context.state.userId, enabled) context.commit('setPlaySounds', enabled) }, }