diff options
Diffstat (limited to 'src/stores/ServicesStore.js')
-rw-r--r-- | src/stores/ServicesStore.js | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/src/stores/ServicesStore.js b/src/stores/ServicesStore.js index 6dfc114f5..ccb85421a 100644 --- a/src/stores/ServicesStore.js +++ b/src/stores/ServicesStore.js | |||
@@ -1,8 +1,5 @@ | |||
1 | // import { remote } from 'electron'; | 1 | import { action, reaction, computed, observable } from 'mobx'; |
2 | import { action, computed, observable } from 'mobx'; | ||
3 | import { debounce, remove } from 'lodash'; | 2 | import { debounce, remove } from 'lodash'; |
4 | // import path from 'path'; | ||
5 | // import fs from 'fs-extra'; | ||
6 | 3 | ||
7 | import Store from './lib/Store'; | 4 | import Store from './lib/Store'; |
8 | import Request from './lib/Request'; | 5 | import Request from './lib/Request'; |
@@ -63,13 +60,20 @@ export default class ServicesStore extends Store { | |||
63 | this._mapActiveServiceToServiceModelReaction.bind(this), | 60 | this._mapActiveServiceToServiceModelReaction.bind(this), |
64 | this._saveActiveService.bind(this), | 61 | this._saveActiveService.bind(this), |
65 | this._logoutReaction.bind(this), | 62 | this._logoutReaction.bind(this), |
66 | this._shareSettingsWithServiceProcess.bind(this), | ||
67 | ]); | 63 | ]); |
68 | 64 | ||
69 | // Just bind this | 65 | // Just bind this |
70 | this._initializeServiceRecipeInWebview.bind(this); | 66 | this._initializeServiceRecipeInWebview.bind(this); |
71 | } | 67 | } |
72 | 68 | ||
69 | setup() { | ||
70 | // Single key reactions | ||
71 | reaction( | ||
72 | () => this.stores.settings.all.app.enableSpellchecking, | ||
73 | () => this._shareSettingsWithServiceProcess(), | ||
74 | ); | ||
75 | } | ||
76 | |||
73 | @computed get all() { | 77 | @computed get all() { |
74 | if (this.stores.user.isLoggedIn) { | 78 | if (this.stores.user.isLoggedIn) { |
75 | const services = this.allServicesRequest.execute().result; | 79 | const services = this.allServicesRequest.execute().result; |