diff options
author | 2019-02-08 11:32:20 +0100 | |
---|---|---|
committer | 2019-02-08 11:32:20 +0100 | |
commit | e2437f27ccd1c7646accc75b819fff3295c7a2e2 (patch) | |
tree | b291106a314e66fe77f11bb9026e12c1bb5839b0 /src/features/spellchecker | |
parent | Remove debugging output (diff) | |
download | ferdium-app-e2437f27ccd1c7646accc75b819fff3295c7a2e2.tar.gz ferdium-app-e2437f27ccd1c7646accc75b819fff3295c7a2e2.tar.zst ferdium-app-e2437f27ccd1c7646accc75b819fff3295c7a2e2.zip |
feat(Spell checking): Add option to automatically detect language
Diffstat (limited to 'src/features/spellchecker')
-rw-r--r-- | src/features/spellchecker/index.js | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/features/spellchecker/index.js b/src/features/spellchecker/index.js index 63506103c..94883ad17 100644 --- a/src/features/spellchecker/index.js +++ b/src/features/spellchecker/index.js | |||
@@ -5,7 +5,7 @@ import { DEFAULT_FEATURES_CONFIG } from '../../config'; | |||
5 | const debug = require('debug')('Franz:feature:spellchecker'); | 5 | const debug = require('debug')('Franz:feature:spellchecker'); |
6 | 6 | ||
7 | export const config = observable({ | 7 | export const config = observable({ |
8 | isPremiumFeature: DEFAULT_FEATURES_CONFIG.isSpellcheckerPremiumFeature, | 8 | isPremium: DEFAULT_FEATURES_CONFIG.isSpellcheckerPremiumFeature, |
9 | }); | 9 | }); |
10 | 10 | ||
11 | export default function init(stores) { | 11 | export default function init(stores) { |
@@ -14,9 +14,11 @@ export default function init(stores) { | |||
14 | autorun(() => { | 14 | autorun(() => { |
15 | const { isSpellcheckerPremiumFeature } = stores.features.features; | 15 | const { isSpellcheckerPremiumFeature } = stores.features.features; |
16 | 16 | ||
17 | config.isPremiumFeature = isSpellcheckerPremiumFeature !== undefined ? isSpellcheckerPremiumFeature : DEFAULT_FEATURES_CONFIG.isSpellcheckerPremiumFeature; | 17 | console.log('isSpellcheckerPremiumFeature', isSpellcheckerPremiumFeature); |
18 | 18 | ||
19 | if (!stores.user.data.isPremium && config.isPremiumFeature && stores.settings.app.enableSpellchecking) { | 19 | config.isPremium = isSpellcheckerPremiumFeature !== undefined ? isSpellcheckerPremiumFeature : DEFAULT_FEATURES_CONFIG.isSpellcheckerPremiumFeature; |
20 | |||
21 | if (!stores.user.data.isPremium && config.isPremium && stores.settings.app.enableSpellchecking) { | ||
20 | debug('Override settings.spellcheckerEnabled flag to false'); | 22 | debug('Override settings.spellcheckerEnabled flag to false'); |
21 | 23 | ||
22 | Object.assign(stores.settings.app, { | 24 | Object.assign(stores.settings.app, { |