aboutsummaryrefslogtreecommitdiffstats
path: root/src/features/serviceLimit/store.js
diff options
context:
space:
mode:
authorLibravatar Stefan Malzner <stefan@adlk.io>2019-06-13 15:15:38 +0200
committerLibravatar Stefan Malzner <stefan@adlk.io>2019-06-13 15:15:38 +0200
commit66647005ae23bccf1691a43ea36565cae4ce9518 (patch)
tree08d5c2a8bf3326e5b36c64bdcf7edd6ebda1ff2f /src/features/serviceLimit/store.js
parentMerge branch 'develop' into feature/service-limit (diff)
downloadferdium-app-66647005ae23bccf1691a43ea36565cae4ce9518.tar.gz
ferdium-app-66647005ae23bccf1691a43ea36565cae4ce9518.tar.zst
ferdium-app-66647005ae23bccf1691a43ea36565cae4ce9518.zip
Improve serviceLimit implementation
Diffstat (limited to 'src/features/serviceLimit/store.js')
-rw-r--r--src/features/serviceLimit/store.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/features/serviceLimit/store.js b/src/features/serviceLimit/store.js
index 752f71371..9836c5f51 100644
--- a/src/features/serviceLimit/store.js
+++ b/src/features/serviceLimit/store.js
@@ -24,12 +24,12 @@ export class ServiceLimitStore extends FeatureStore {
24 @computed get userHasReachedServiceLimit() { 24 @computed get userHasReachedServiceLimit() {
25 if (!this.isServiceLimitEnabled) return false; 25 if (!this.isServiceLimitEnabled) return false;
26 26
27 const { user } = this.stores; 27 return this.serviceLimit !== 0 && this.serviceCount >= this.serviceLimit;
28
29 return !user.isPremium && this.serviceCount >= this.serviceLimit;
30 } 28 }
31 29
32 @computed get serviceLimit() { 30 @computed get serviceLimit() {
31 if (!this.isServiceLimitEnabled || this.stores.features.features.serviceLimitCount === 0) return 0;
32
33 return this.stores.features.features.serviceLimitCount || DEFAULT_SERVICE_LIMIT; 33 return this.stores.features.features.serviceLimitCount || DEFAULT_SERVICE_LIMIT;
34 } 34 }
35 35