diff options
-rw-r--r-- | src/api/LocalApi.js | 12 | ||||
-rw-r--r-- | src/stores/SettingsStore.js | 9 |
2 files changed, 1 insertions, 20 deletions
diff --git a/src/api/LocalApi.js b/src/api/LocalApi.js index 3f84f8a0b..59d7d8fa2 100644 --- a/src/api/LocalApi.js +++ b/src/api/LocalApi.js | |||
@@ -4,18 +4,6 @@ export default class LocalApi { | |||
4 | this.local = local; | 4 | this.local = local; |
5 | } | 5 | } |
6 | 6 | ||
7 | getSettings() { | ||
8 | return this.local.getAppSettings(); | ||
9 | } | ||
10 | |||
11 | updateSettings(data) { | ||
12 | return this.local.updateAppSettings(data); | ||
13 | } | ||
14 | |||
15 | removeKey(key) { | ||
16 | return this.local.removeKey(key); | ||
17 | } | ||
18 | |||
19 | getAppCacheSize() { | 7 | getAppCacheSize() { |
20 | return this.local.getAppCacheSize(); | 8 | return this.local.getAppCacheSize(); |
21 | } | 9 | } |
diff --git a/src/stores/SettingsStore.js b/src/stores/SettingsStore.js index 9dc8d82d2..b7d803398 100644 --- a/src/stores/SettingsStore.js +++ b/src/stores/SettingsStore.js | |||
@@ -1,18 +1,12 @@ | |||
1 | import { ipcRenderer } from 'electron'; | 1 | import { ipcRenderer } from 'electron'; |
2 | import { action, computed, observable } from 'mobx'; | 2 | import { action, computed } from 'mobx'; |
3 | import localStorage from 'mobx-localstorage'; | 3 | import localStorage from 'mobx-localstorage'; |
4 | 4 | ||
5 | import Store from './lib/Store'; | 5 | import Store from './lib/Store'; |
6 | import Request from './lib/Request'; | ||
7 | import CachedRequest from './lib/CachedRequest'; | ||
8 | import { gaEvent } from '../lib/analytics'; | 6 | import { gaEvent } from '../lib/analytics'; |
9 | import SettingsModel from '../models/Settings'; | 7 | import SettingsModel from '../models/Settings'; |
10 | 8 | ||
11 | export default class SettingsStore extends Store { | 9 | export default class SettingsStore extends Store { |
12 | @observable allSettingsRequest = new CachedRequest(this.api.local, 'getSettings'); | ||
13 | @observable updateSettingsRequest = new Request(this.api.local, 'updateSettings'); | ||
14 | @observable removeSettingsKeyRequest = new Request(this.api.local, 'removeKey'); | ||
15 | |||
16 | constructor(...args) { | 10 | constructor(...args) { |
17 | super(...args); | 11 | super(...args); |
18 | 12 | ||
@@ -22,7 +16,6 @@ export default class SettingsStore extends Store { | |||
22 | } | 16 | } |
23 | 17 | ||
24 | setup() { | 18 | setup() { |
25 | this.allSettingsRequest.execute(); | ||
26 | this._shareSettingsWithMainProcess(); | 19 | this._shareSettingsWithMainProcess(); |
27 | } | 20 | } |
28 | 21 | ||