aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatar Stefan Malzner <stefan@adlk.io>2018-11-26 10:31:12 +0100
committerLibravatar Stefan Malzner <stefan@adlk.io>2018-11-26 10:31:12 +0100
commit55ea36b33f087cc0f823eabe69e1666b0207cca4 (patch)
treed04fefe4d61a8023c083da91df709951b4d0be06
parentMove spellchecker to premium (diff)
downloadferdium-app-55ea36b33f087cc0f823eabe69e1666b0207cca4.tar.gz
ferdium-app-55ea36b33f087cc0f823eabe69e1666b0207cca4.tar.zst
ferdium-app-55ea36b33f087cc0f823eabe69e1666b0207cca4.zip
Fix listening key
-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