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.js11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/models/Service.js b/src/models/Service.js
index eb68493fe..d0985969b 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
@@ -58,6 +58,15 @@ export default class Service {
58 this.isMuted = data.isMuted !== undefined ? data.isMuted : this.isMuted; 58 this.isMuted = data.isMuted !== undefined ? data.isMuted : this.isMuted;
59 59
60 this.recipe = recipe; 60 this.recipe = recipe;
61
62 autorun(() => {
63 if (!this.isEnabled) {
64 this.webview = null;
65 this.isAttached = false;
66 this.unreadDirectMessageCount = 0;
67 this.unreadIndirectMessageCount = 0;
68 }
69 });
61 } 70 }
62 71
63 @computed get url() { 72 @computed get url() {