diff options
Diffstat (limited to 'src/models/Service.js')
-rw-r--r-- | src/models/Service.js | 10 |
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 @@ | |||
1 | import { computed, observable } from 'mobx'; | 1 | import { computed, observable, autorun } from 'mobx'; |
2 | import path from 'path'; | 2 | import path from 'path'; |
3 | import normalizeUrl from 'normalize-url'; | 3 | import 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() { |