aboutsummaryrefslogtreecommitdiffstats
path: root/src/stores
diff options
context:
space:
mode:
authorLibravatar Vijay A <vraravam@users.noreply.github.com>2021-10-16 21:43:20 +0530
committerLibravatar Vijay A <vraravam@users.noreply.github.com>2021-10-16 21:43:20 +0530
commit19ef0c756eba1b6c554ce9892f503534e2bf0597 (patch)
tree3eeb4b631805a39f00ab58a0995c0003df467007 /src/stores
parentregenerate i18n file (diff)
downloadferdium-app-19ef0c756eba1b6c554ce9892f503534e2bf0597.tar.gz
ferdium-app-19ef0c756eba1b6c554ce9892f503534e2bf0597.tar.zst
ferdium-app-19ef0c756eba1b6c554ce9892f503534e2bf0597.zip
refactor: move service-defaults into the 'config' file for reuse
Diffstat (limited to 'src/stores')
-rw-r--r--src/stores/ServicesStore.js20
1 files changed, 9 insertions, 11 deletions
diff --git a/src/stores/ServicesStore.js b/src/stores/ServicesStore.js
index c6baa4358..4f7ad7442 100644
--- a/src/stores/ServicesStore.js
+++ b/src/stores/ServicesStore.js
@@ -15,7 +15,7 @@ import {
15 getDevRecipeDirectory, 15 getDevRecipeDirectory,
16} from '../helpers/recipe-helpers'; 16} from '../helpers/recipe-helpers';
17import { workspaceStore } from '../features/workspaces'; 17import { workspaceStore } from '../features/workspaces';
18import { KEEP_WS_LOADED_USID } from '../config'; 18import { DEFAULT_SERVICE_SETTINGS, KEEP_WS_LOADED_USID } from '../config';
19import { SPELLCHECKER_LOCALES } from '../i18n/languages'; 19import { SPELLCHECKER_LOCALES } from '../i18n/languages';
20import { ferdiVersion } from '../environment-remote'; 20import { ferdiVersion } from '../environment-remote';
21 21
@@ -395,17 +395,15 @@ export default class ServicesStore extends Store {
395 } 395 }
396 396
397 // set default values for serviceData 397 // set default values for serviceData
398
399 // TODO: How is this different from the defaults of the recipe in 'src/models/Recipe' file?
400 serviceData = { 398 serviceData = {
401 isEnabled: true, 399 isEnabled: DEFAULT_SERVICE_SETTINGS.isEnabled,
402 isHibernationEnabled: false, 400 isHibernationEnabled: DEFAULT_SERVICE_SETTINGS.isHibernationEnabled,
403 isWakeUpEnabled: true, 401 isWakeUpEnabled: DEFAULT_SERVICE_SETTINGS.isWakeUpEnabled,
404 isNotificationEnabled: true, 402 isNotificationEnabled: DEFAULT_SERVICE_SETTINGS.isNotificationEnabled,
405 isBadgeEnabled: true, 403 isBadgeEnabled: DEFAULT_SERVICE_SETTINGS.isBadgeEnabled,
406 isMuted: false, 404 isMuted: DEFAULT_SERVICE_SETTINGS.isMuted,
407 customIcon: false, 405 customIcon: DEFAULT_SERVICE_SETTINGS.customIcon,
408 isDarkModeEnabled: false, 406 isDarkModeEnabled: DEFAULT_SERVICE_SETTINGS.isDarkModeEnabled,
409 spellcheckerLanguage: 407 spellcheckerLanguage:
410 SPELLCHECKER_LOCALES[this.stores.settings.app.spellcheckerLanguage], 408 SPELLCHECKER_LOCALES[this.stores.settings.app.spellcheckerLanguage],
411 userAgentPref: '', 409 userAgentPref: '',