diff options
Diffstat (limited to 'src/stores')
-rw-r--r-- | src/stores/ServicesStore.js | 10 | ||||
-rw-r--r-- | src/stores/SettingsStore.js | 2 |
2 files changed, 6 insertions, 6 deletions
diff --git a/src/stores/ServicesStore.js b/src/stores/ServicesStore.js index b04aafd78..66f37af26 100644 --- a/src/stores/ServicesStore.js +++ b/src/stores/ServicesStore.js | |||
@@ -297,7 +297,7 @@ export default class ServicesStore extends Store { | |||
297 | }); | 297 | }); |
298 | } else if (channel === 'notification') { | 298 | } else if (channel === 'notification') { |
299 | const options = args[0].options; | 299 | const options = args[0].options; |
300 | if (service.recipe.hasNotificationSound || service.isMuted) { | 300 | if (service.recipe.hasNotificationSound || service.isMuted || this.stores.settings.all.isAppMuted) { |
301 | Object.assign(options, { | 301 | Object.assign(options, { |
302 | silent: true, | 302 | silent: true, |
303 | }); | 303 | }); |
@@ -491,13 +491,13 @@ export default class ServicesStore extends Store { | |||
491 | const showMessageBadgeWhenMuted = this.stores.settings.all.showMessageBadgeWhenMuted; | 491 | const showMessageBadgeWhenMuted = this.stores.settings.all.showMessageBadgeWhenMuted; |
492 | const showMessageBadgesEvenWhenMuted = this.stores.ui.showMessageBadgesEvenWhenMuted; | 492 | const showMessageBadgesEvenWhenMuted = this.stores.ui.showMessageBadgesEvenWhenMuted; |
493 | 493 | ||
494 | const unreadDirectMessageCount = this.enabled | 494 | const unreadDirectMessageCount = this.allDisplayed |
495 | .filter(s => (showMessageBadgeWhenMuted || s.isNotificationEnabled) && showMessageBadgesEvenWhenMuted) | 495 | .filter(s => (showMessageBadgeWhenMuted || s.isNotificationEnabled) && showMessageBadgesEvenWhenMuted && s.isBadgeEnabled) |
496 | .map(s => s.unreadDirectMessageCount) | 496 | .map(s => s.unreadDirectMessageCount) |
497 | .reduce((a, b) => a + b, 0); | 497 | .reduce((a, b) => a + b, 0); |
498 | 498 | ||
499 | const unreadIndirectMessageCount = this.enabled | 499 | const unreadIndirectMessageCount = this.allDisplayed |
500 | .filter(s => (showMessageBadgeWhenMuted || s.isIndirectMessageBadgeEnabled) && showMessageBadgesEvenWhenMuted) | 500 | .filter(s => (showMessageBadgeWhenMuted || s.isIndirectMessageBadgeEnabled) && showMessageBadgesEvenWhenMuted && s.isBadgeEnabled) |
501 | .map(s => s.unreadIndirectMessageCount) | 501 | .map(s => s.unreadIndirectMessageCount) |
502 | .reduce((a, b) => a + b, 0); | 502 | .reduce((a, b) => a + b, 0); |
503 | 503 | ||
diff --git a/src/stores/SettingsStore.js b/src/stores/SettingsStore.js index 33473f16d..da99a720f 100644 --- a/src/stores/SettingsStore.js +++ b/src/stores/SettingsStore.js | |||
@@ -26,7 +26,7 @@ export default class SettingsStore extends Store { | |||
26 | } | 26 | } |
27 | 27 | ||
28 | @computed get all() { | 28 | @computed get all() { |
29 | return this.allSettingsRequest.result || new SettingsModel(); | 29 | return new SettingsModel(this.allSettingsRequest.result); |
30 | } | 30 | } |
31 | 31 | ||
32 | @action async _update({ settings }) { | 32 | @action async _update({ settings }) { |