diff options
author | Stefan Malzner <stefan@adlk.io> | 2018-11-30 14:32:45 +0100 |
---|---|---|
committer | Stefan Malzner <stefan@adlk.io> | 2018-11-30 14:32:45 +0100 |
commit | 3d87c0e45cead95ddb6c11fc6540b82e375bdcf5 (patch) | |
tree | c91f425a39cb585242d6df5b4070de4a2141b3b4 /src/stores/SettingsStore.js | |
parent | Merge branch 'update/monetization' into develop (diff) | |
download | ferdium-app-3d87c0e45cead95ddb6c11fc6540b82e375bdcf5.tar.gz ferdium-app-3d87c0e45cead95ddb6c11fc6540b82e375bdcf5.tar.zst ferdium-app-3d87c0e45cead95ddb6c11fc6540b82e375bdcf5.zip |
feat(App): Improved spell checker & context menu
Diffstat (limited to 'src/stores/SettingsStore.js')
-rw-r--r-- | src/stores/SettingsStore.js | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/stores/SettingsStore.js b/src/stores/SettingsStore.js index b62ac15e0..4a42ed924 100644 --- a/src/stores/SettingsStore.js +++ b/src/stores/SettingsStore.js | |||
@@ -5,8 +5,10 @@ import localStorage from 'mobx-localstorage'; | |||
5 | import Store from './lib/Store'; | 5 | import Store from './lib/Store'; |
6 | import Request from './lib/Request'; | 6 | import Request from './lib/Request'; |
7 | import CachedRequest from './lib/CachedRequest'; | 7 | import CachedRequest from './lib/CachedRequest'; |
8 | import { getLocale } from '../helpers/i18n-helpers'; | ||
8 | 9 | ||
9 | import { DEFAULT_APP_SETTINGS, FILE_SYSTEM_SETTINGS_TYPES } from '../config'; | 10 | import { DEFAULT_APP_SETTINGS, FILE_SYSTEM_SETTINGS_TYPES } from '../config'; |
11 | import { SPELLCHECKER_LOCALES } from '../i18n/languages'; | ||
10 | 12 | ||
11 | const { systemPreferences } = remote; | 13 | const { systemPreferences } = remote; |
12 | const debug = require('debug')('Franz:SettingsStore'); | 14 | const debug = require('debug')('Franz:SettingsStore'); |
@@ -41,7 +43,6 @@ export default class SettingsStore extends Store { | |||
41 | }); | 43 | }); |
42 | 44 | ||
43 | this.fileSystemSettingsTypes.forEach((type) => { | 45 | this.fileSystemSettingsTypes.forEach((type) => { |
44 | console.log(type); | ||
45 | ipcRenderer.send('getAppSettings', type); | 46 | ipcRenderer.send('getAppSettings', type); |
46 | }); | 47 | }); |
47 | } | 48 | } |
@@ -157,10 +158,18 @@ export default class SettingsStore extends Store { | |||
157 | 158 | ||
158 | // Enable dark mode once | 159 | // Enable dark mode once |
159 | if (!this.all.migration['5.0.0-beta.19-settings']) { | 160 | if (!this.all.migration['5.0.0-beta.19-settings']) { |
161 | const spellcheckerLanguage = getLocale({ | ||
162 | locale: this.stores.settings.app.locale, | ||
163 | locales: SPELLCHECKER_LOCALES, | ||
164 | defaultLocale: DEFAULT_APP_SETTINGS.spellcheckerLanguage, | ||
165 | fallbackLocale: DEFAULT_APP_SETTINGS.spellcheckerLanguage, | ||
166 | }); | ||
167 | |||
160 | this.actions.settings.update({ | 168 | this.actions.settings.update({ |
161 | type: 'app', | 169 | type: 'app', |
162 | data: { | 170 | data: { |
163 | darkMode: systemPreferences.isDarkMode(), | 171 | darkMode: systemPreferences.isDarkMode(), |
172 | spellcheckerLanguage, | ||
164 | }, | 173 | }, |
165 | }); | 174 | }); |
166 | 175 | ||