From 5187b37aca4d6ca177c254f999e6acb637db5532 Mon Sep 17 00:00:00 2001 From: Henry Jameson Date: Tue, 26 May 2020 22:50:37 +0300 Subject: [PATCH] moved multiChoiceProperties where it fits better --- .../tabs/helpers/shared_computed_object.js | 11 +++++------ src/modules/config.js | 10 ++++++++++ 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/src/components/settings_modal/tabs/helpers/shared_computed_object.js b/src/components/settings_modal/tabs/helpers/shared_computed_object.js index 61643e3b..b6a18e9c 100644 --- a/src/components/settings_modal/tabs/helpers/shared_computed_object.js +++ b/src/components/settings_modal/tabs/helpers/shared_computed_object.js @@ -1,10 +1,9 @@ import { filter, trim } from 'lodash' -import { instanceDefaultProperties, defaultState as configDefaultState } from 'src/modules/config.js' - -const multiChoiceProperties = [ - 'postContentType', - 'subjectLineBehavior' -] +import { + instanceDefaultProperties, + multiChoiceProperties, + defaultState as configDefaultState +} from 'src/modules/config.js' const SharedComputedObject = () => ({ user () { diff --git a/src/modules/config.js b/src/modules/config.js index 8f4638f5..b6b1b241 100644 --- a/src/modules/config.js +++ b/src/modules/config.js @@ -3,6 +3,16 @@ import { setPreset, applyTheme } from '../services/style_setter/style_setter.js' const browserLocale = (window.navigator.language || 'en').split('-')[0] +/* TODO this is a bit messy. + * We need to declare settings with their types and also deal with + * instance-default settings in some way, hopefully try to avoid copy-pasta + * in general. + */ +export const multiChoiceProperties = [ + 'postContentType', + 'subjectLineBehavior' +] + export const defaultState = { colors: {}, theme: undefined,