diff options
author | Vijay A <avijayr@protonmail.com> | 2021-08-13 00:45:01 +0530 |
---|---|---|
committer | Vijay A <avijayr@protonmail.com> | 2021-08-13 00:45:01 +0530 |
commit | 2d27d5e66649d4f5baf127a53ee5ae524eae3a59 (patch) | |
tree | c592ea219ac8cd987fc367f57b54034c450ab2ab /src/features/planSelection/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/planSelection/index.js')
-rw-r--r-- | src/features/planSelection/index.js | 28 |
1 files changed, 0 insertions, 28 deletions
diff --git a/src/features/planSelection/index.js b/src/features/planSelection/index.js deleted file mode 100644 index b96ad6d8f..000000000 --- a/src/features/planSelection/index.js +++ /dev/null | |||
@@ -1,28 +0,0 @@ | |||
1 | import { reaction } from 'mobx'; | ||
2 | import PlanSelectionStore from './store'; | ||
3 | |||
4 | const debug = require('debug')('Ferdi:feature:planSelection'); | ||
5 | |||
6 | export const planSelectionStore = new PlanSelectionStore(); | ||
7 | |||
8 | export default function initPlanSelection(stores, actions) { | ||
9 | stores.planSelection = planSelectionStore; | ||
10 | const { features } = stores; | ||
11 | |||
12 | // Toggle planSelection feature | ||
13 | reaction( | ||
14 | () => features.features.isPlanSelectionEnabled, | ||
15 | (isEnabled) => { | ||
16 | if (isEnabled) { | ||
17 | debug('Initializing `planSelection` feature'); | ||
18 | planSelectionStore.start(stores, actions); | ||
19 | } else if (planSelectionStore.isFeatureActive) { | ||
20 | debug('Disabling `planSelection` feature'); | ||
21 | planSelectionStore.stop(); | ||
22 | } | ||
23 | }, | ||
24 | { | ||
25 | fireImmediately: true, | ||
26 | }, | ||
27 | ); | ||
28 | } | ||