aboutsummaryrefslogtreecommitdiffstats
path: root/src/stores/ServicesStore.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/stores/ServicesStore.js')
-rw-r--r--src/stores/ServicesStore.js20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/stores/ServicesStore.js b/src/stores/ServicesStore.js
index 84f84891a..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
@@ -291,6 +292,8 @@ export default class ServicesStore extends Store {
291 this.all[index].isActive = false; 292 this.all[index].isActive = false;
292 }); 293 });
293 service.isActive = true; 294 service.isActive = true;
295
296 this._focusActiveService();
294 } 297 }
295 298
296 @action _setActiveNext() { 299 @action _setActiveNext() {
@@ -341,6 +344,9 @@ export default class ServicesStore extends Store {
341 const service = this.one(serviceId); 344 const service = this.one(serviceId);
342 345
343 if (service.webview) { 346 if (service.webview) {
347 if (document.activeElement) {
348 document.activeElement.blur();
349 }
344 service.webview.focus(); 350 service.webview.focus();
345 } 351 }
346 } 352 }
@@ -622,6 +628,20 @@ export default class ServicesStore extends Store {
622 } 628 }
623 } 629 }
624 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
625 _shareSettingsWithServiceProcess() { 645 _shareSettingsWithServiceProcess() {
626 const settings = this.stores.settings.app; 646 const settings = this.stores.settings.app;
627 this.actions.service.sendIPCMessageToAllServices({ 647 this.actions.service.sendIPCMessageToAllServices({