aboutsummaryrefslogtreecommitdiffstats
path: root/src/features/spellchecker
diff options
context:
space:
mode:
authorLibravatar Stefan Malzner <stefan@adlk.io>2018-12-01 14:34:39 +0100
committerLibravatar Stefan Malzner <stefan@adlk.io>2018-12-01 14:34:39 +0100
commit035dc1bbb1951bfe99740009f8b999c65861d133 (patch)
tree4e987938d7a25c08ea64f2692d5ae9f0b8bd80fe /src/features/spellchecker
parentShow service dark mode option only for dark mode services (diff)
downloadferdium-app-035dc1bbb1951bfe99740009f8b999c65861d133.tar.gz
ferdium-app-035dc1bbb1951bfe99740009f8b999c65861d133.tar.zst
ferdium-app-035dc1bbb1951bfe99740009f8b999c65861d133.zip
Move default feature config to config.js
Diffstat (limited to 'src/features/spellchecker')
-rw-r--r--src/features/spellchecker/index.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/features/spellchecker/index.js b/src/features/spellchecker/index.js
index 9bffc1949..454096e4e 100644
--- a/src/features/spellchecker/index.js
+++ b/src/features/spellchecker/index.js
@@ -1,11 +1,11 @@
1import { autorun, reaction } from 'mobx'; 1import { autorun, reaction } from 'mobx';
2 2
3const debug = require('debug')('Franz:feature:spellchecker'); 3import { DEFAULT_FEATURES_CONFIG } from '../../config';
4 4
5const DEFAULT_IS_PREMIUM_FEATURE = true; 5const debug = require('debug')('Franz:feature:spellchecker');
6 6
7export const config = { 7export const config = {
8 isPremiumFeature: DEFAULT_IS_PREMIUM_FEATURE, 8 isPremiumFeature: DEFAULT_FEATURES_CONFIG.isSpellcheckerPremiumFeature,
9}; 9};
10 10
11export default function init(stores) { 11export default function init(stores) {
@@ -19,7 +19,7 @@ export default function init(stores) {
19 19
20 const { isSpellcheckerPremiumFeature } = stores.features.features; 20 const { isSpellcheckerPremiumFeature } = stores.features.features;
21 21
22 config.isPremiumFeature = isSpellcheckerPremiumFeature !== undefined ? isSpellcheckerPremiumFeature : DEFAULT_IS_PREMIUM_FEATURE; 22 config.isPremiumFeature = isSpellcheckerPremiumFeature !== undefined ? isSpellcheckerPremiumFeature : DEFAULT_FEATURES_CONFIG.isSpellcheckerPremiumFeature;
23 23
24 autorun(() => { 24 autorun(() => {
25 if (!stores.user.data.isPremium && config.isPremiumFeature) { 25 if (!stores.user.data.isPremium && config.isPremiumFeature) {