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.js17
1 files changed, 16 insertions, 1 deletions
diff --git a/src/stores/ServicesStore.js b/src/stores/ServicesStore.js
index 96c503510..a20718eca 100644
--- a/src/stores/ServicesStore.js
+++ b/src/stores/ServicesStore.js
@@ -48,6 +48,7 @@ export default class ServicesStore extends Store {
48 this.actions.service.reloadUpdatedServices.listen(this._reloadUpdatedServices.bind(this)); 48 this.actions.service.reloadUpdatedServices.listen(this._reloadUpdatedServices.bind(this));
49 this.actions.service.reorder.listen(this._reorder.bind(this)); 49 this.actions.service.reorder.listen(this._reorder.bind(this));
50 this.actions.service.toggleNotifications.listen(this._toggleNotifications.bind(this)); 50 this.actions.service.toggleNotifications.listen(this._toggleNotifications.bind(this));
51 this.actions.service.toggleAudio.listen(this._toggleAudio.bind(this));
51 this.actions.service.openDevTools.listen(this._openDevTools.bind(this)); 52 this.actions.service.openDevTools.listen(this._openDevTools.bind(this));
52 this.actions.service.openDevToolsForActiveService.listen(this._openDevToolsForActiveService.bind(this)); 53 this.actions.service.openDevToolsForActiveService.listen(this._openDevToolsForActiveService.bind(this));
53 54
@@ -399,11 +400,25 @@ export default class ServicesStore extends Store {
399 @action _toggleNotifications({ serviceId }) { 400 @action _toggleNotifications({ serviceId }) {
400 const service = this.one(serviceId); 401 const service = this.one(serviceId);
401 402
403 this.actions.service.updateService({
404 serviceId,
405 serviceData: {
406 isNotificationEnabled: !service.isNotificationEnabled,
407 },
408 redirect: false,
409 });
410 }
411
412 @action _toggleAudio({ serviceId }) {
413 const service = this.one(serviceId);
414
402 service.isNotificationEnabled = !service.isNotificationEnabled; 415 service.isNotificationEnabled = !service.isNotificationEnabled;
403 416
404 this.actions.service.updateService({ 417 this.actions.service.updateService({
405 serviceId, 418 serviceId,
406 serviceData: service, 419 serviceData: {
420 isMuted: !service.isMuted,
421 },
407 redirect: false, 422 redirect: false,
408 }); 423 });
409 } 424 }