From 893a9f6d9a1bcdbbfe925e718b2c907dcceaa64e Mon Sep 17 00:00:00 2001 From: Stefan Malzner Date: Fri, 1 Dec 2017 12:26:41 +0100 Subject: feat(App): Add option to show/hide notification badges for muted services (@maximiliancsuk) --- src/stores/UIStore.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/stores/UIStore.js') 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 @@ -import { action, observable } from 'mobx'; +import { action, observable, computed } from 'mobx'; import Store from './lib/Store'; @@ -14,6 +14,12 @@ export default class UIStore extends Store { this.actions.ui.toggleServiceUpdatedInfoBar.listen(this._toggleServiceUpdatedInfoBar.bind(this)); } + @computed get showMessageBadgesEvenWhenMuted() { + const settings = this.stores.settings.all; + + return (settings.isAppMuted && settings.showMessageBadgeWhenMuted) || !settings.isAppMuted; + } + // Actions @action _openSettings({ path = '/settings' }) { const settingsPath = path !== '/settings' ? `/settings/${path}` : path; -- cgit v1.2.3-70-g09d2