blob: 6a393e2505321974eb38306b2bf3b533c6d272a3 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
import { autorun, observable } from 'mobx';
import { DEFAULT_FEATURES_CONFIG } from '../../config';
const debug = require('debug')('Ferdi:feature:spellchecker');
export const config = observable({
isIncludedInCurrentPlan: DEFAULT_FEATURES_CONFIG.isSpellcheckerIncludedInCurrentPlan,
});
export default function init() {
debug('Initializing `spellchecker` feature');
autorun(() => {
// const { isSpellcheckerIncludedInCurrentPlan } = stores.features.features;
// config.isIncludedInCurrentPlan = isSpellcheckerIncludedInCurrentPlan !== undefined ? isSpellcheckerIncludedInCurrentPlan : DEFAULT_FEATURES_CONFIG.isSpellcheckerIncludedInCurrentPlan;
// if (!stores.user.data.isPremium && config.isIncludedInCurrentPlan && stores.settings.app.enableSpellchecking) {
// debug('Override settings.spellcheckerEnabled flag to false');
// Object.assign(stores.settings.app, {
// enableSpellchecking: false,
// });
// }
});
}
|