aboutsummaryrefslogtreecommitdiffstats
path: root/src/stores/FeaturesStore.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/stores/FeaturesStore.ts')
-rw-r--r--src/stores/FeaturesStore.ts17
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
9import { Stores } from '../@types/stores.types'; 8import { Stores } from '../@types/stores.types';
10import { ApiInterface } from '../api'; 9import { ApiInterface } from '../api';
11import { Actions } from '../actions/lib/actions'; 10import { Actions } from '../actions/lib/actions';
@@ -21,6 +20,14 @@ import appearance from '../features/appearance';
21import TypedStore from './lib/TypedStore'; 20import TypedStore from './lib/TypedStore';
22 21
23export default class FeaturesStore extends TypedStore { 22export 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,