diff options
author | Stefan Malzner <stefan@adlk.io> | 2019-02-11 15:11:50 +0100 |
---|---|---|
committer | Stefan Malzner <stefan@adlk.io> | 2019-02-11 15:11:50 +0100 |
commit | c7a39ffef3904c6215b7f17c5d3a221b70099be1 (patch) | |
tree | 3f08628c69c1916437c54989da86b50179a0c876 /src/stores | |
parent | Update electron-window-state (diff) | |
parent | Fix typo (diff) | |
download | ferdium-app-c7a39ffef3904c6215b7f17c5d3a221b70099be1.tar.gz ferdium-app-c7a39ffef3904c6215b7f17c5d3a221b70099be1.tar.zst ferdium-app-c7a39ffef3904c6215b7f17c5d3a221b70099be1.zip |
Merge branch 'master' into develop
Diffstat (limited to 'src/stores')
-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 0ab57312a..efd57a09d 100644 --- a/src/stores/ServicesStore.js +++ b/src/stores/ServicesStore.js | |||
@@ -70,6 +70,7 @@ export default class ServicesStore extends Store { | |||
70 | this._mapActiveServiceToServiceModelReaction.bind(this), | 70 | this._mapActiveServiceToServiceModelReaction.bind(this), |
71 | this._saveActiveService.bind(this), | 71 | this._saveActiveService.bind(this), |
72 | this._logoutReaction.bind(this), | 72 | this._logoutReaction.bind(this), |
73 | this._handleMuteSettings.bind(this), | ||
73 | ]); | 74 | ]); |
74 | 75 | ||
75 | // Just bind this | 76 | // Just bind this |
@@ -627,6 +628,20 @@ export default class ServicesStore extends Store { | |||
627 | } | 628 | } |
628 | } | 629 | } |
629 | 630 | ||
631 | _handleMuteSettings() { | ||
632 | const { enabled } = this; | ||
633 | const { isAppMuted } = this.stores.settings.app; | ||
634 | |||
635 | enabled.forEach((service) => { | ||
636 | const { isAttached } = service; | ||
637 | const isMuted = isAppMuted || service.isMuted; | ||
638 | |||
639 | if (isAttached) { | ||
640 | service.webview.setAudioMuted(isMuted); | ||
641 | } | ||
642 | }); | ||
643 | } | ||
644 | |||
630 | _shareSettingsWithServiceProcess() { | 645 | _shareSettingsWithServiceProcess() { |
631 | const settings = this.stores.settings.app; | 646 | const settings = this.stores.settings.app; |
632 | this.actions.service.sendIPCMessageToAllServices({ | 647 | this.actions.service.sendIPCMessageToAllServices({ |