diff options
Diffstat (limited to 'src/stores/ServicesStore.js')
-rw-r--r-- | src/stores/ServicesStore.js | 61 |
1 files changed, 43 insertions, 18 deletions
diff --git a/src/stores/ServicesStore.js b/src/stores/ServicesStore.js index 2ec6a0a68..06f33cc1e 100644 --- a/src/stores/ServicesStore.js +++ b/src/stores/ServicesStore.js | |||
@@ -10,10 +10,7 @@ import Request from './lib/Request'; | |||
10 | import CachedRequest from './lib/CachedRequest'; | 10 | import CachedRequest from './lib/CachedRequest'; |
11 | import { matchRoute } from '../helpers/routing-helpers'; | 11 | import { matchRoute } from '../helpers/routing-helpers'; |
12 | import { isInTimeframe } from '../helpers/schedule-helpers'; | 12 | import { isInTimeframe } from '../helpers/schedule-helpers'; |
13 | import { | 13 | import { getRecipeDirectory, getDevRecipeDirectory } from '../helpers/recipe-helpers'; |
14 | getRecipeDirectory, | ||
15 | getDevRecipeDirectory, | ||
16 | } from '../helpers/recipe-helpers'; | ||
17 | import { workspaceStore } from '../features/workspaces'; | 14 | import { workspaceStore } from '../features/workspaces'; |
18 | import { KEEP_WS_LOADED_USID } from '../config'; | 15 | import { KEEP_WS_LOADED_USID } from '../config'; |
19 | import { SPELLCHECKER_LOCALES } from '../i18n/languages'; | 16 | import { SPELLCHECKER_LOCALES } from '../i18n/languages'; |
@@ -128,38 +125,66 @@ export default class ServicesStore extends Store { | |||
128 | setup() { | 125 | setup() { |
129 | // Single key reactions for the sake of your CPU | 126 | // Single key reactions for the sake of your CPU |
130 | reaction( | 127 | reaction( |
131 | () => this.stores.settings.app.enableSpellchecking, | 128 | () => ( |
132 | () => this._shareSettingsWithServiceProcess(), | 129 | this.stores.settings.app.enableSpellchecking |
130 | ), | ||
131 | () => { | ||
132 | this._shareSettingsWithServiceProcess(); | ||
133 | }, | ||
133 | ); | 134 | ); |
134 | 135 | ||
135 | reaction( | 136 | reaction( |
136 | () => this.stores.settings.app.spellcheckerLanguage, | 137 | () => ( |
137 | () => this._shareSettingsWithServiceProcess(), | 138 | this.stores.settings.app.spellcheckerLanguage |
139 | ), | ||
140 | () => { | ||
141 | this._shareSettingsWithServiceProcess(); | ||
142 | }, | ||
138 | ); | 143 | ); |
139 | 144 | ||
140 | reaction( | 145 | reaction( |
141 | () => this.stores.settings.app.darkMode, | 146 | () => ( |
142 | () => this._shareSettingsWithServiceProcess(), | 147 | this.stores.settings.app.darkMode |
148 | ), | ||
149 | () => { | ||
150 | this._shareSettingsWithServiceProcess(); | ||
151 | }, | ||
143 | ); | 152 | ); |
144 | 153 | ||
145 | reaction( | 154 | reaction( |
146 | () => this.stores.settings.app.adaptableDarkMode, | 155 | () => ( |
147 | () => this._shareSettingsWithServiceProcess(), | 156 | this.stores.settings.app.adaptableDarkMode |
157 | ), | ||
158 | () => { | ||
159 | this._shareSettingsWithServiceProcess(); | ||
160 | }, | ||
148 | ); | 161 | ); |
149 | 162 | ||
150 | reaction( | 163 | reaction( |
151 | () => this.stores.settings.app.universalDarkMode, | 164 | () => ( |
152 | () => this._shareSettingsWithServiceProcess(), | 165 | this.stores.settings.app.universalDarkMode |
166 | ), | ||
167 | () => { | ||
168 | this._shareSettingsWithServiceProcess(); | ||
169 | }, | ||
153 | ); | 170 | ); |
154 | 171 | ||
155 | reaction( | 172 | reaction( |
156 | () => this.stores.settings.app.searchEngine, | 173 | () => ( |
157 | () => this._shareSettingsWithServiceProcess(), | 174 | this.stores.settings.app.searchEngine |
175 | ), | ||
176 | () => { | ||
177 | this._shareSettingsWithServiceProcess(); | ||
178 | }, | ||
158 | ); | 179 | ); |
159 | 180 | ||
160 | reaction( | 181 | reaction( |
161 | () => this.stores.settings.app.clipboardNotifications, | 182 | () => ( |
162 | () => this._shareSettingsWithServiceProcess(), | 183 | this.stores.settings.app.clipboardNotifications |
184 | ), | ||
185 | () => { | ||
186 | this._shareSettingsWithServiceProcess(); | ||
187 | }, | ||
163 | ); | 188 | ); |
164 | } | 189 | } |
165 | 190 | ||