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/AppStore.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/AppStore.js')
-rw-r--r-- | src/stores/AppStore.js | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/stores/AppStore.js b/src/stores/AppStore.js index ecfd621d3..6580157d4 100644 --- a/src/stores/AppStore.js +++ b/src/stores/AppStore.js | |||
@@ -57,6 +57,8 @@ export default class AppStore extends Store { | |||
57 | this.actions.app.installUpdate.listen(this._installUpdate.bind(this)); | 57 | this.actions.app.installUpdate.listen(this._installUpdate.bind(this)); |
58 | this.actions.app.resetUpdateStatus.listen(this._resetUpdateStatus.bind(this)); | 58 | this.actions.app.resetUpdateStatus.listen(this._resetUpdateStatus.bind(this)); |
59 | this.actions.app.healthCheck.listen(this._healthCheck.bind(this)); | 59 | this.actions.app.healthCheck.listen(this._healthCheck.bind(this)); |
60 | this.actions.app.muteApp.listen(this._muteApp.bind(this)); | ||
61 | this.actions.app.toggleMuteApp.listen(this._toggleMuteApp.bind(this)); | ||
60 | 62 | ||
61 | this.registerReactions([ | 63 | this.registerReactions([ |
62 | this._offlineCheck.bind(this), | 64 | this._offlineCheck.bind(this), |
@@ -202,6 +204,18 @@ export default class AppStore extends Store { | |||
202 | this.healthCheckRequest.execute(); | 204 | this.healthCheckRequest.execute(); |
203 | } | 205 | } |
204 | 206 | ||
207 | @action _muteApp({ isMuted }) { | ||
208 | this.actions.settings.update({ | ||
209 | settings: { | ||
210 | isMuted, | ||
211 | }, | ||
212 | }); | ||
213 | } | ||
214 | |||
215 | @action _toggleMuteApp() { | ||
216 | this._muteApp({ isMuted: !this.stores.settings.all.isMuted }); | ||
217 | } | ||
218 | |||
205 | // Reactions | 219 | // Reactions |
206 | _offlineCheck() { | 220 | _offlineCheck() { |
207 | if (!this.isOnline) { | 221 | if (!this.isOnline) { |