aboutsummaryrefslogtreecommitdiffstats
path: root/src/stores/UIStore.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/UIStore.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/UIStore.js')
-rw-r--r--src/stores/UIStore.js8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/stores/UIStore.js b/src/stores/UIStore.js
index cb45b88b5..5e9cc9ba7 100644
--- a/src/stores/UIStore.js
+++ b/src/stores/UIStore.js
@@ -1,4 +1,4 @@
1import { action, observable } from 'mobx'; 1import { action, observable, computed } from 'mobx';
2 2
3import Store from './lib/Store'; 3import Store from './lib/Store';
4 4
@@ -14,6 +14,12 @@ export default class UIStore extends Store {
14 this.actions.ui.toggleServiceUpdatedInfoBar.listen(this._toggleServiceUpdatedInfoBar.bind(this)); 14 this.actions.ui.toggleServiceUpdatedInfoBar.listen(this._toggleServiceUpdatedInfoBar.bind(this));
15 } 15 }
16 16
17 @computed get showMessageBadgesEvenWhenMuted() {
18 const settings = this.stores.settings.all;
19
20 return (settings.isAppMuted && settings.showMessageBadgeWhenMuted) || !settings.isAppMuted;
21 }
22
17 // Actions 23 // Actions
18 @action _openSettings({ path = '/settings' }) { 24 @action _openSettings({ path = '/settings' }) {
19 const settingsPath = path !== '/settings' ? `/settings/${path}` : path; 25 const settingsPath = path !== '/settings' ? `/settings/${path}` : path;