diff options
author | Stefan Malzner <stefan@adlk.io> | 2017-11-10 12:08:35 +0100 |
---|---|---|
committer | Stefan Malzner <stefan@adlk.io> | 2017-11-10 12:08:35 +0100 |
commit | f5a9aa21e2ab958f60c143668f4836bc47e2b539 (patch) | |
tree | 7d7cb70dee56e6ca4a927f7789601cc428381659 /src/stores/ServicesStore.js | |
parent | feat(Service): Add option to mute service (diff) | |
download | ferdium-app-f5a9aa21e2ab958f60c143668f4836bc47e2b539.tar.gz ferdium-app-f5a9aa21e2ab958f60c143668f4836bc47e2b539.tar.zst ferdium-app-f5a9aa21e2ab958f60c143668f4836bc47e2b539.zip |
feat(App): Add option to mute all services in sidebar
Diffstat (limited to 'src/stores/ServicesStore.js')
-rw-r--r-- | src/stores/ServicesStore.js | 17 |
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 | } |