diff options
author | 2021-08-13 00:45:01 +0530 | |
---|---|---|
committer | 2021-08-13 00:45:01 +0530 | |
commit | 2d27d5e66649d4f5baf127a53ee5ae524eae3a59 (patch) | |
tree | c592ea219ac8cd987fc367f57b54034c450ab2ab /src/features/serviceLimit/store.js | |
parent | Ferdi v5.6.0 (diff) | |
parent | 5.6.1-nightly.24 [skip ci] (diff) | |
download | ferdium-app-2d27d5e66649d4f5baf127a53ee5ae524eae3a59.tar.gz ferdium-app-2d27d5e66649d4f5baf127a53ee5ae524eae3a59.tar.zst ferdium-app-2d27d5e66649d4f5baf127a53ee5ae524eae3a59.zip |
chore: merge from nightly branch into release branch in prep for next beta
Diffstat (limited to 'src/features/serviceLimit/store.js')
-rw-r--r-- | src/features/serviceLimit/store.js | 42 |
1 files changed, 0 insertions, 42 deletions
diff --git a/src/features/serviceLimit/store.js b/src/features/serviceLimit/store.js deleted file mode 100644 index b1e55a1fc..000000000 --- a/src/features/serviceLimit/store.js +++ /dev/null | |||
@@ -1,42 +0,0 @@ | |||
1 | import { computed, observable } from 'mobx'; | ||
2 | import { FeatureStore } from '../utils/FeatureStore'; | ||
3 | import { DEFAULT_SERVICE_LIMIT } from '../../config'; | ||
4 | |||
5 | const debug = require('debug')('Ferdi:feature:serviceLimit:store'); | ||
6 | |||
7 | export class ServiceLimitStore extends FeatureStore { | ||
8 | @observable isServiceLimitEnabled = false; | ||
9 | |||
10 | start(stores, actions) { | ||
11 | debug('start'); | ||
12 | this.stores = stores; | ||
13 | this.actions = actions; | ||
14 | |||
15 | this.isServiceLimitEnabled = false; | ||
16 | } | ||
17 | |||
18 | stop() { | ||
19 | super.stop(); | ||
20 | |||
21 | this.isServiceLimitEnabled = false; | ||
22 | } | ||
23 | |||
24 | @computed get userHasReachedServiceLimit() { | ||
25 | return false; | ||
26 | // if (!this.isServiceLimitEnabled) return false; | ||
27 | |||
28 | // return this.serviceLimit !== 0 && this.serviceCount >= this.serviceLimit; | ||
29 | } | ||
30 | |||
31 | @computed get serviceLimit() { | ||
32 | if (!this.isServiceLimitEnabled || this.stores.features.features.serviceLimitCount === 0) return 0; | ||
33 | |||
34 | return this.stores.features.features.serviceLimitCount || DEFAULT_SERVICE_LIMIT; | ||
35 | } | ||
36 | |||
37 | @computed get serviceCount() { | ||
38 | return this.stores.services.all.length; | ||
39 | } | ||
40 | } | ||
41 | |||
42 | export default ServiceLimitStore; | ||