diff options
author | Stefan Malzner <stefan@adlk.io> | 2018-12-14 23:24:54 +0100 |
---|---|---|
committer | Stefan Malzner <stefan@adlk.io> | 2018-12-14 23:24:54 +0100 |
commit | 33b4c1e5fa00d365709572cb58a41c2480231368 (patch) | |
tree | bccd4ab08f4f098ca21e207335ae92c2c20e7ece /src/stores/ServicesStore.js | |
parent | fix(Sidebar): Add better contrast for mute button in dark mode (diff) | |
download | ferdium-app-33b4c1e5fa00d365709572cb58a41c2480231368.tar.gz ferdium-app-33b4c1e5fa00d365709572cb58a41c2480231368.tar.zst ferdium-app-33b4c1e5fa00d365709572cb58a41c2480231368.zip |
fix(App): Fix notification sounds when app or services are muted
Diffstat (limited to 'src/stores/ServicesStore.js')
-rw-r--r-- | src/stores/ServicesStore.js | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/stores/ServicesStore.js b/src/stores/ServicesStore.js index 5b70ca271..a618da547 100644 --- a/src/stores/ServicesStore.js +++ b/src/stores/ServicesStore.js | |||
@@ -67,6 +67,7 @@ export default class ServicesStore extends Store { | |||
67 | this._mapActiveServiceToServiceModelReaction.bind(this), | 67 | this._mapActiveServiceToServiceModelReaction.bind(this), |
68 | this._saveActiveService.bind(this), | 68 | this._saveActiveService.bind(this), |
69 | this._logoutReaction.bind(this), | 69 | this._logoutReaction.bind(this), |
70 | this._handleMuteSettings.bind(this), | ||
70 | ]); | 71 | ]); |
71 | 72 | ||
72 | // Just bind this | 73 | // Just bind this |
@@ -615,6 +616,20 @@ export default class ServicesStore extends Store { | |||
615 | } | 616 | } |
616 | } | 617 | } |
617 | 618 | ||
619 | _handleMuteSettings() { | ||
620 | const { enabled } = this; | ||
621 | const { isAppMuted } = this.stores.settings.app; | ||
622 | |||
623 | enabled.forEach((service) => { | ||
624 | const { isAttached } = service; | ||
625 | const isMuted = isAppMuted || service.isMuted; | ||
626 | |||
627 | if (isAttached) { | ||
628 | service.webview.setAudioMuted(isMuted); | ||
629 | } | ||
630 | }); | ||
631 | } | ||
632 | |||
618 | _shareSettingsWithServiceProcess() { | 633 | _shareSettingsWithServiceProcess() { |
619 | const settings = this.stores.settings.app; | 634 | const settings = this.stores.settings.app; |
620 | this.actions.service.sendIPCMessageToAllServices({ | 635 | this.actions.service.sendIPCMessageToAllServices({ |