aboutsummaryrefslogtreecommitdiffstats
path: root/src/models/Service.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/models/Service.js')
-rw-r--r--src/models/Service.js10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/models/Service.js b/src/models/Service.js
index dc53807f7..fc89f81b8 100644
--- a/src/models/Service.js
+++ b/src/models/Service.js
@@ -1,4 +1,4 @@
1import { computed, observable } from 'mobx'; 1import { computed, observable, autorun } from 'mobx';
2import path from 'path'; 2import path from 'path';
3import normalizeUrl from 'normalize-url'; 3import normalizeUrl from 'normalize-url';
4 4
@@ -55,6 +55,14 @@ export default class Service {
55 ? data.isIndirectMessageBadgeEnabled : this.isIndirectMessageBadgeEnabled; 55 ? data.isIndirectMessageBadgeEnabled : this.isIndirectMessageBadgeEnabled;
56 56
57 this.recipe = recipe; 57 this.recipe = recipe;
58
59 autorun(() => {
60 if (!this.isEnabled) {
61 this.webview = null;
62 this.unreadDirectMessageCount = 0;
63 this.unreadIndirectMessageCount = 0;
64 }
65 });
58 } 66 }
59 67
60 @computed get url() { 68 @computed get url() {