Skip to content

Commit

Permalink
Fix listening key
Browse files Browse the repository at this point in the history
  • Loading branch information
adlk committed Nov 26, 2018
1 parent 0d9c7ff commit 55ea36b
Showing 1 changed file with 2 additions and 17 deletions.
19 changes: 2 additions & 17 deletions src/features/spellchecker/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export const config = {

export default function init(stores) {
reaction(
() => stores.features.features.needToWaitToProceed,
() => stores.features.features.isSpellcheckerPremiumFeature,
(enabled, r) => {
if (enabled) {
debug('Initializing `spellchecker` feature');
Expand All @@ -22,23 +22,8 @@ export default function init(stores) {

config.isPremiumFeature = isSpellcheckerPremiumFeature || DEFAULT_IS_PREMIUM_FEATURE;

// reaction(
// () => stores.settings.all.app.enableSpellchecking,
// (enabled, r) => {
// if (enabled) {
// // debug('Initializing `spellchecker` feature');

// // // Dispose the reaction to run this only once
// // r.dispose();

// // const { isSpellcheckerPremiumFeature } = stores.features.features;

// // config.isPremiumFeature = isSpellcheckerPremiumFeature || DEFAULT_IS_PREMIUM_FEATURE;
// }
// },
// );

autorun(() => {
console.log('FEATURE spellchecker autorun', stores.user.data.isPremium, config.isPremiumFeature);
if (!stores.user.data.isPremium && config.isPremiumFeature) {
debug('Override settings.spellcheckerEnabled flag to false');

Expand Down

0 comments on commit 55ea36b

Please sign in to comment.