diff options
author | Vijay A <avijayr@protonmail.com> | 2021-08-13 08:18:13 +0530 |
---|---|---|
committer | Vijay Raghavan Aravamudhan <vraravam@users.noreply.github.com> | 2021-08-13 07:32:56 +0000 |
commit | 5130935ad52c149837fd45e936c943223d13dfc4 (patch) | |
tree | 442283749984f39efba450981c22716c84e613a3 /src/stores | |
parent | refactor: Use destructured 'import' (diff) | |
download | ferdium-app-5130935ad52c149837fd45e936c943223d13dfc4.tar.gz ferdium-app-5130935ad52c149837fd45e936c943223d13dfc4.tar.zst ferdium-app-5130935ad52c149837fd45e936c943223d13dfc4.zip |
chore: Refactoring to reuse already defined constants
Diffstat (limited to 'src/stores')
-rw-r--r-- | src/stores/AppStore.js | 3 | ||||
-rw-r--r-- | src/stores/ServicesStore.js | 4 |
2 files changed, 4 insertions, 3 deletions
diff --git a/src/stores/AppStore.js b/src/stores/AppStore.js index 1d706f1ef..180f01af6 100644 --- a/src/stores/AppStore.js +++ b/src/stores/AppStore.js | |||
@@ -24,6 +24,7 @@ import { | |||
24 | electronVersion, | 24 | electronVersion, |
25 | osRelease, | 25 | osRelease, |
26 | userDataPath, | 26 | userDataPath, |
27 | ferdiLocale, | ||
27 | } from '../environment'; | 28 | } from '../environment'; |
28 | import locales from '../i18n/translations'; | 29 | import locales from '../i18n/translations'; |
29 | import { onVisibilityChange } from '../helpers/visibility-helper'; | 30 | import { onVisibilityChange } from '../helpers/visibility-helper'; |
@@ -509,7 +510,7 @@ export default class AppStore extends Store { | |||
509 | 510 | ||
510 | _getDefaultLocale() { | 511 | _getDefaultLocale() { |
511 | return getLocale({ | 512 | return getLocale({ |
512 | locale: app.getLocale(), | 513 | locale: ferdiLocale, |
513 | locales, | 514 | locales, |
514 | defaultLocale, | 515 | defaultLocale, |
515 | fallbackLocale: DEFAULT_APP_SETTINGS.fallbackLocale, | 516 | fallbackLocale: DEFAULT_APP_SETTINGS.fallbackLocale, |
diff --git a/src/stores/ServicesStore.js b/src/stores/ServicesStore.js index 4ccb995ae..2ec6a0a68 100644 --- a/src/stores/ServicesStore.js +++ b/src/stores/ServicesStore.js | |||
@@ -2,7 +2,6 @@ import { shell } from 'electron'; | |||
2 | import { action, reaction, computed, observable } from 'mobx'; | 2 | import { action, reaction, computed, observable } from 'mobx'; |
3 | import { debounce, remove } from 'lodash'; | 3 | import { debounce, remove } from 'lodash'; |
4 | import ms from 'ms'; | 4 | import ms from 'ms'; |
5 | import { app } from '@electron/remote'; | ||
6 | import { ensureFileSync, pathExistsSync, writeFileSync } from 'fs-extra'; | 5 | import { ensureFileSync, pathExistsSync, writeFileSync } from 'fs-extra'; |
7 | import { join } from 'path'; | 6 | import { join } from 'path'; |
8 | 7 | ||
@@ -18,6 +17,7 @@ import { | |||
18 | import { workspaceStore } from '../features/workspaces'; | 17 | import { workspaceStore } from '../features/workspaces'; |
19 | import { KEEP_WS_LOADED_USID } from '../config'; | 18 | import { KEEP_WS_LOADED_USID } from '../config'; |
20 | import { SPELLCHECKER_LOCALES } from '../i18n/languages'; | 19 | import { SPELLCHECKER_LOCALES } from '../i18n/languages'; |
20 | import { ferdiVersion } from '../environment'; | ||
21 | 21 | ||
22 | const debug = require('debug')('Ferdi:ServiceStore'); | 22 | const debug = require('debug')('Ferdi:ServiceStore'); |
23 | 23 | ||
@@ -1149,7 +1149,7 @@ export default class ServicesStore extends Store { | |||
1149 | 'initialize-recipe', | 1149 | 'initialize-recipe', |
1150 | { | 1150 | { |
1151 | ...shareWithWebview, | 1151 | ...shareWithWebview, |
1152 | franzVersion: app.getVersion(), | 1152 | franzVersion: ferdiVersion, |
1153 | }, | 1153 | }, |
1154 | service.recipe, | 1154 | service.recipe, |
1155 | ); | 1155 | ); |