diff options
author | Stefan Malzner <stefan@adlk.io> | 2018-12-01 21:08:14 +0100 |
---|---|---|
committer | Stefan Malzner <stefan@adlk.io> | 2018-12-01 21:08:14 +0100 |
commit | 3d235897a61b684c6147331342a235df151a980b (patch) | |
tree | 08cf9c111b501b9b874807dce9f8e8e860f21603 /src/stores/FeaturesStore.js | |
parent | fix linting issues (diff) | |
download | ferdium-app-3d235897a61b684c6147331342a235df151a980b.tar.gz ferdium-app-3d235897a61b684c6147331342a235df151a980b.tar.zst ferdium-app-3d235897a61b684c6147331342a235df151a980b.zip |
split features into features and anonymousFeatures
Diffstat (limited to 'src/stores/FeaturesStore.js')
-rw-r--r-- | src/stores/FeaturesStore.js | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/stores/FeaturesStore.js b/src/stores/FeaturesStore.js index 9480e27ab..10c893d3f 100644 --- a/src/stores/FeaturesStore.js +++ b/src/stores/FeaturesStore.js | |||
@@ -22,12 +22,16 @@ export default class FeaturesStore extends Store { | |||
22 | setTimeout(this._enableFeatures.bind(this), 1); | 22 | setTimeout(this._enableFeatures.bind(this), 1); |
23 | } | 23 | } |
24 | 24 | ||
25 | @computed get anonymousFeatures() { | ||
26 | return this.defaultFeaturesRequest.execute().result || DEFAULT_FEATURES_CONFIG; | ||
27 | } | ||
28 | |||
25 | @computed get features() { | 29 | @computed get features() { |
26 | if (this.stores.user.isLoggedIn) { | 30 | if (this.stores.user.isLoggedIn) { |
27 | return this.featuresRequest.execute().result || DEFAULT_FEATURES_CONFIG; | 31 | return this.featuresRequest.execute().result || DEFAULT_FEATURES_CONFIG; |
28 | } | 32 | } |
29 | 33 | ||
30 | return this.defaultFeaturesRequest.execute().result || DEFAULT_FEATURES_CONFIG; | 34 | return DEFAULT_FEATURES_CONFIG; |
31 | } | 35 | } |
32 | 36 | ||
33 | _monitorLoginStatus() { | 37 | _monitorLoginStatus() { |