aboutsummaryrefslogtreecommitdiffstats
path: root/src/stores/ServicesStore.js
diff options
context:
space:
mode:
authorLibravatar Stefan Malzner <stefan@adlk.io>2018-03-28 10:12:03 +0200
committerLibravatar Stefan Malzner <stefan@adlk.io>2018-03-28 10:12:26 +0200
commit5398846e58d87f5ef54ccc19f4ccb318166ef621 (patch)
treea2d19dac75532152cfb0c9e5df7db10475da005f /src/stores/ServicesStore.js
parentSet correct keys for new settings store (diff)
downloadferdium-app-5398846e58d87f5ef54ccc19f4ccb318166ef621.tar.gz
ferdium-app-5398846e58d87f5ef54ccc19f4ccb318166ef621.tar.zst
ferdium-app-5398846e58d87f5ef54ccc19f4ccb318166ef621.zip
Replace share settings with webviews autorun with single key reaction
Diffstat (limited to 'src/stores/ServicesStore.js')
-rw-r--r--src/stores/ServicesStore.js14
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'; 1import { action, reaction, computed, observable } from 'mobx';
2import { action, computed, observable } from 'mobx';
3import { debounce, remove } from 'lodash'; 2import { debounce, remove } from 'lodash';
4// import path from 'path';
5// import fs from 'fs-extra';
6 3
7import Store from './lib/Store'; 4import Store from './lib/Store';
8import Request from './lib/Request'; 5import 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;