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/index.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/index.js')
-rw-r--r-- | src/features/serviceLimit/index.js | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/src/features/serviceLimit/index.js b/src/features/serviceLimit/index.js deleted file mode 100644 index f867e3d87..000000000 --- a/src/features/serviceLimit/index.js +++ /dev/null | |||
@@ -1,31 +0,0 @@ | |||
1 | import { reaction } from 'mobx'; | ||
2 | import { ServiceLimitStore } from './store'; | ||
3 | |||
4 | const debug = require('debug')('Ferdi:feature:serviceLimit'); | ||
5 | |||
6 | let store = null; | ||
7 | |||
8 | export const serviceLimitStore = new ServiceLimitStore(); | ||
9 | |||
10 | export default function initServiceLimit(stores, actions) { | ||
11 | const { features } = stores; | ||
12 | |||
13 | // Toggle serviceLimit feature | ||
14 | reaction( | ||
15 | () => ( | ||
16 | features.features.isServiceLimitEnabled | ||
17 | ), | ||
18 | (isEnabled) => { | ||
19 | if (isEnabled) { | ||
20 | debug('Initializing `serviceLimit` feature'); | ||
21 | store = serviceLimitStore.start(stores, actions); | ||
22 | } else if (store) { | ||
23 | debug('Disabling `serviceLimit` feature'); | ||
24 | serviceLimitStore.stop(); | ||
25 | } | ||
26 | }, | ||
27 | { | ||
28 | fireImmediately: true, | ||
29 | }, | ||
30 | ); | ||
31 | } | ||