aboutsummaryrefslogtreecommitdiffstats
path: root/src/stores/ServicesStore.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/stores/ServicesStore.js')
-rw-r--r--src/stores/ServicesStore.js12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/stores/ServicesStore.js b/src/stores/ServicesStore.js
index 4d98df851..6c6b7589f 100644
--- a/src/stores/ServicesStore.js
+++ b/src/stores/ServicesStore.js
@@ -4,7 +4,7 @@ import {
4 computed, 4 computed,
5 observable, 5 observable,
6} from 'mobx'; 6} from 'mobx';
7import { debounce, remove } from 'lodash'; 7import { remove } from 'lodash';
8import ms from 'ms'; 8import ms from 'ms';
9 9
10import Store from './lib/Store'; 10import Store from './lib/Store';
@@ -262,8 +262,6 @@ export default class ServicesStore extends Store {
262 remove(result, c => c.id === serviceId); 262 remove(result, c => c.id === serviceId);
263 }); 263 });
264 264
265 const service = this.one(serviceId);
266
267 await request._promise; 265 await request._promise;
268 this.actionStatus = request.result.status; 266 this.actionStatus = request.result.status;
269 } 267 }
@@ -385,7 +383,7 @@ export default class ServicesStore extends Store {
385 }, 383 },
386 }); 384 });
387 } else if (channel === 'notification') { 385 } else if (channel === 'notification') {
388 const options = args[0].options; 386 const { options } = args[0];
389 if (service.recipe.hasNotificationSound || service.isMuted || this.stores.settings.all.app.isAppMuted) { 387 if (service.recipe.hasNotificationSound || service.isMuted || this.stores.settings.all.app.isAppMuted) {
390 Object.assign(options, { 388 Object.assign(options, {
391 silent: true, 389 silent: true,
@@ -509,7 +507,7 @@ export default class ServicesStore extends Store {
509 } 507 }
510 508
511 @action _reorderService({ oldIndex, newIndex }) { 509 @action _reorderService({ oldIndex, newIndex }) {
512 const showDisabledServices = this.stores.settings.all.app.showDisabledServices; 510 const { showDisabledServices } = this.stores.settings.all.app;
513 const oldEnabledSortIndex = showDisabledServices ? oldIndex : this.all.indexOf(this.enabled[oldIndex]); 511 const oldEnabledSortIndex = showDisabledServices ? oldIndex : this.all.indexOf(this.enabled[oldIndex]);
514 const newEnabledSortIndex = showDisabledServices ? newIndex : this.all.indexOf(this.enabled[newIndex]); 512 const newEnabledSortIndex = showDisabledServices ? newIndex : this.all.indexOf(this.enabled[newIndex]);
515 513
@@ -603,8 +601,8 @@ export default class ServicesStore extends Store {
603 } 601 }
604 602
605 _getUnreadMessageCountReaction() { 603 _getUnreadMessageCountReaction() {
606 const showMessageBadgeWhenMuted = this.stores.settings.all.app.showMessageBadgeWhenMuted; 604 const { showMessageBadgeWhenMuted } = this.stores.settings.all.app;
607 const showMessageBadgesEvenWhenMuted = this.stores.ui.showMessageBadgesEvenWhenMuted; 605 const { showMessageBadgesEvenWhenMuted } = this.stores.ui;
608 606
609 const unreadDirectMessageCount = this.allDisplayed 607 const unreadDirectMessageCount = this.allDisplayed
610 .filter(s => (showMessageBadgeWhenMuted || s.isNotificationEnabled) && showMessageBadgesEvenWhenMuted && s.isBadgeEnabled) 608 .filter(s => (showMessageBadgeWhenMuted || s.isNotificationEnabled) && showMessageBadgesEvenWhenMuted && s.isBadgeEnabled)