aboutsummaryrefslogtreecommitdiffstats
path: root/src/stores/AppStore.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/stores/AppStore.js')
-rw-r--r--src/stores/AppStore.js14
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) {