aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/features/spellchecker/index.js19
1 files changed, 2 insertions, 17 deletions
diff --git a/src/features/spellchecker/index.js b/src/features/spellchecker/index.js
index 2627c9d17..9336f4074 100644
--- a/src/features/spellchecker/index.js
+++ b/src/features/spellchecker/index.js
@@ -10,7 +10,7 @@ export const config = {
10 10
11export default function init(stores) { 11export default function init(stores) {
12 reaction( 12 reaction(
13 () => stores.features.features.needToWaitToProceed, 13 () => stores.features.features.isSpellcheckerPremiumFeature,
14 (enabled, r) => { 14 (enabled, r) => {
15 if (enabled) { 15 if (enabled) {
16 debug('Initializing `spellchecker` feature'); 16 debug('Initializing `spellchecker` feature');
@@ -22,23 +22,8 @@ export default function init(stores) {
22 22
23 config.isPremiumFeature = isSpellcheckerPremiumFeature || DEFAULT_IS_PREMIUM_FEATURE; 23 config.isPremiumFeature = isSpellcheckerPremiumFeature || DEFAULT_IS_PREMIUM_FEATURE;
24 24
25 // reaction(
26 // () => stores.settings.all.app.enableSpellchecking,
27 // (enabled, r) => {
28 // if (enabled) {
29 // // debug('Initializing `spellchecker` feature');
30
31 // // // Dispose the reaction to run this only once
32 // // r.dispose();
33
34 // // const { isSpellcheckerPremiumFeature } = stores.features.features;
35
36 // // config.isPremiumFeature = isSpellcheckerPremiumFeature || DEFAULT_IS_PREMIUM_FEATURE;
37 // }
38 // },
39 // );
40
41 autorun(() => { 25 autorun(() => {
26 console.log('FEATURE spellchecker autorun', stores.user.data.isPremium, config.isPremiumFeature);
42 if (!stores.user.data.isPremium && config.isPremiumFeature) { 27 if (!stores.user.data.isPremium && config.isPremiumFeature) {
43 debug('Override settings.spellcheckerEnabled flag to false'); 28 debug('Override settings.spellcheckerEnabled flag to false');
44 29