diff options
Diffstat (limited to 'src/stores/FeaturesStore.ts')
-rw-r--r-- | src/stores/FeaturesStore.ts | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/src/stores/FeaturesStore.ts b/src/stores/FeaturesStore.ts index 5f43ccf84..8584b6060 100644 --- a/src/stores/FeaturesStore.ts +++ b/src/stores/FeaturesStore.ts | |||
@@ -5,7 +5,6 @@ import { | |||
5 | observable, | 5 | observable, |
6 | runInAction, | 6 | runInAction, |
7 | } from 'mobx'; | 7 | } from 'mobx'; |
8 | |||
9 | import { Stores } from '../@types/stores.types'; | 8 | import { Stores } from '../@types/stores.types'; |
10 | import { ApiInterface } from '../api'; | 9 | import { ApiInterface } from '../api'; |
11 | import { Actions } from '../actions/lib/actions'; | 10 | import { Actions } from '../actions/lib/actions'; |
@@ -21,6 +20,14 @@ import appearance from '../features/appearance'; | |||
21 | import TypedStore from './lib/TypedStore'; | 20 | import TypedStore from './lib/TypedStore'; |
22 | 21 | ||
23 | export default class FeaturesStore extends TypedStore { | 22 | export default class FeaturesStore extends TypedStore { |
23 | @observable features = {}; | ||
24 | |||
25 | constructor(stores: Stores, api: ApiInterface, actions: Actions) { | ||
26 | super(stores, api, actions); | ||
27 | |||
28 | makeObservable(this); | ||
29 | } | ||
30 | |||
24 | @observable defaultFeaturesRequest = new CachedRequest( | 31 | @observable defaultFeaturesRequest = new CachedRequest( |
25 | this.api.features, | 32 | this.api.features, |
26 | 'default', | 33 | 'default', |
@@ -31,14 +38,6 @@ export default class FeaturesStore extends TypedStore { | |||
31 | 'features', | 38 | 'features', |
32 | ); | 39 | ); |
33 | 40 | ||
34 | @observable features = {}; | ||
35 | |||
36 | constructor(stores: Stores, api: ApiInterface, actions: Actions) { | ||
37 | super(stores, api, actions); | ||
38 | |||
39 | makeObservable(this); | ||
40 | } | ||
41 | |||
42 | async setup(): Promise<void> { | 41 | async setup(): Promise<void> { |
43 | this.registerReactions([ | 42 | this.registerReactions([ |
44 | this._updateFeatures, | 43 | this._updateFeatures, |