aboutsummaryrefslogtreecommitdiffstats
path: root/src/stores/AppStore.js
diff options
context:
space:
mode:
authorLibravatar Stefan Malzner <stefan@adlk.io>2017-12-01 12:26:41 +0100
committerLibravatar Stefan Malzner <stefan@adlk.io>2017-12-01 12:26:41 +0100
commit893a9f6d9a1bcdbbfe925e718b2c907dcceaa64e (patch)
tree4f6ff5c4f82abe536107a38c9894fad7f41a0c62 /src/stores/AppStore.js
parentfix(App): Allow to turn on notifications when system dnd is enabled (diff)
downloadferdium-app-893a9f6d9a1bcdbbfe925e718b2c907dcceaa64e.tar.gz
ferdium-app-893a9f6d9a1bcdbbfe925e718b2c907dcceaa64e.tar.zst
ferdium-app-893a9f6d9a1bcdbbfe925e718b2c907dcceaa64e.zip
feat(App): Add option to show/hide notification badges for muted services (@maximiliancsuk)
Diffstat (limited to 'src/stores/AppStore.js')
-rw-r--r--src/stores/AppStore.js9
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