diff options
Diffstat (limited to 'src/stores/AppStore.js')
-rw-r--r-- | src/stores/AppStore.js | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/stores/AppStore.js b/src/stores/AppStore.js index 0cfe08a28..6125a7cff 100644 --- a/src/stores/AppStore.js +++ b/src/stores/AppStore.js | |||
@@ -67,6 +67,7 @@ export default class AppStore extends Store { | |||
67 | this._setLocale.bind(this), | 67 | this._setLocale.bind(this), |
68 | this._handleMiner.bind(this), | 68 | this._handleMiner.bind(this), |
69 | this._handleMinerThrottle.bind(this), | 69 | this._handleMinerThrottle.bind(this), |
70 | this._muteAppHandler.bind(this), | ||
70 | ]); | 71 | ]); |
71 | } | 72 | } |
72 | 73 | ||
@@ -300,6 +301,14 @@ export default class AppStore extends Store { | |||
300 | } | 301 | } |
301 | } | 302 | } |
302 | 303 | ||
304 | _muteAppHandler() { | ||
305 | const showMessageBadgesEvenWhenMuted = this.stores.ui.showMessageBadgesEvenWhenMuted; | ||
306 | |||
307 | if (!showMessageBadgesEvenWhenMuted) { | ||
308 | this.actions.app.setBadge({ unreadDirectMessageCount: 0, unreadIndirectMessageCount: 0 }); | ||
309 | } | ||
310 | } | ||
311 | |||
303 | // Helpers | 312 | // Helpers |
304 | async _appStartsCounter() { | 313 | async _appStartsCounter() { |
305 | // we need to wait until the settings request is resolved | 314 | // we need to wait until the settings request is resolved |