aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/components/services/content/ServiceWebview.js3
-rw-r--r--src/components/services/content/Services.js3
-rw-r--r--src/containers/layout/AppLayoutContainer.js1
-rw-r--r--src/models/Service.js2
-rw-r--r--src/stores/ServicesStore.js15
5 files changed, 16 insertions, 8 deletions
diff --git a/src/components/services/content/ServiceWebview.js b/src/components/services/content/ServiceWebview.js
index b1a2c0207..bb577e4cc 100644
--- a/src/components/services/content/ServiceWebview.js
+++ b/src/components/services/content/ServiceWebview.js
@@ -18,7 +18,6 @@ export default @observer class ServiceWebview extends Component {
18 setWebviewReference: PropTypes.func.isRequired, 18 setWebviewReference: PropTypes.func.isRequired,
19 reload: PropTypes.func.isRequired, 19 reload: PropTypes.func.isRequired,
20 edit: PropTypes.func.isRequired, 20 edit: PropTypes.func.isRequired,
21 isAppMuted: PropTypes.bool.isRequired,
22 enable: PropTypes.func.isRequired, 21 enable: PropTypes.func.isRequired,
23 isActive: PropTypes.bool, 22 isActive: PropTypes.bool,
24 }; 23 };
@@ -69,7 +68,6 @@ export default @observer class ServiceWebview extends Component {
69 setWebviewReference, 68 setWebviewReference,
70 reload, 69 reload,
71 edit, 70 edit,
72 isAppMuted,
73 enable, 71 enable,
74 } = this.props; 72 } = this.props;
75 73
@@ -137,7 +135,6 @@ export default @observer class ServiceWebview extends Component {
137 })} 135 })}
138 onUpdateTargetUrl={this.updateTargetUrl} 136 onUpdateTargetUrl={this.updateTargetUrl}
139 useragent={service.userAgent} 137 useragent={service.userAgent}
140 muted={isAppMuted || service.isMuted}
141 allowpopups 138 allowpopups
142 /> 139 />
143 )} 140 )}
diff --git a/src/components/services/content/Services.js b/src/components/services/content/Services.js
index 1aeb17e03..54f16ba12 100644
--- a/src/components/services/content/Services.js
+++ b/src/components/services/content/Services.js
@@ -26,7 +26,6 @@ export default @observer class Services extends Component {
26 openWindow: PropTypes.func.isRequired, 26 openWindow: PropTypes.func.isRequired,
27 reload: PropTypes.func.isRequired, 27 reload: PropTypes.func.isRequired,
28 openSettings: PropTypes.func.isRequired, 28 openSettings: PropTypes.func.isRequired,
29 isAppMuted: PropTypes.bool.isRequired,
30 update: PropTypes.func.isRequired, 29 update: PropTypes.func.isRequired,
31 }; 30 };
32 31
@@ -46,7 +45,6 @@ export default @observer class Services extends Component {
46 openWindow, 45 openWindow,
47 reload, 46 reload,
48 openSettings, 47 openSettings,
49 isAppMuted,
50 update, 48 update,
51 } = this.props; 49 } = this.props;
52 const { intl } = this.context; 50 const { intl } = this.context;
@@ -81,7 +79,6 @@ export default @observer class Services extends Component {
81 openWindow={openWindow} 79 openWindow={openWindow}
82 reload={() => reload({ serviceId: service.id })} 80 reload={() => reload({ serviceId: service.id })}
83 edit={() => openSettings({ path: `services/edit/${service.id}` })} 81 edit={() => openSettings({ path: `services/edit/${service.id}` })}
84 isAppMuted={isAppMuted}
85 enable={() => update({ 82 enable={() => update({
86 serviceId: service.id, 83 serviceId: service.id,
87 serviceData: { 84 serviceData: {
diff --git a/src/containers/layout/AppLayoutContainer.js b/src/containers/layout/AppLayoutContainer.js
index 430b49b55..749912c59 100644
--- a/src/containers/layout/AppLayoutContainer.js
+++ b/src/containers/layout/AppLayoutContainer.js
@@ -108,7 +108,6 @@ export default @inject('stores', 'actions') @observer class AppLayoutContainer e
108 openWindow={openWindow} 108 openWindow={openWindow}
109 reload={reload} 109 reload={reload}
110 openSettings={openSettings} 110 openSettings={openSettings}
111 isAppMuted={settings.all.app.isAppMuted}
112 update={updateService} 111 update={updateService}
113 /> 112 />
114 ); 113 );
diff --git a/src/models/Service.js b/src/models/Service.js
index 4cc6102ff..cb66676d4 100644
--- a/src/models/Service.js
+++ b/src/models/Service.js
@@ -15,7 +15,7 @@ export default class Service {
15 15
16 events = {}; 16 events = {};
17 17
18 isAttached = false; 18 @observable isAttached = false;
19 19
20 @observable isActive = false; // Is current webview active 20 @observable isActive = false; // Is current webview active
21 21
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({