diff options
author | 2021-10-16 21:50:33 +0530 | |
---|---|---|
committer | 2021-10-16 21:50:33 +0530 | |
commit | 9260f5f372b5f1f1440f8eecafc2d9f72d20645c (patch) | |
tree | 4b94ec5f6ffb758fdedcda6e30cc9f04fd9594d5 /src/containers/settings | |
parent | refactor: move service-defaults into the 'config' file for reuse (diff) | |
download | ferdium-app-9260f5f372b5f1f1440f8eecafc2d9f72d20645c.tar.gz ferdium-app-9260f5f372b5f1f1440f8eecafc2d9f72d20645c.tar.zst ferdium-app-9260f5f372b5f1f1440f8eecafc2d9f72d20645c.zip |
refactor: move service-defaults into the 'config' file for reuse
Diffstat (limited to 'src/containers/settings')
-rw-r--r-- | src/containers/settings/EditServiceScreen.js | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/containers/settings/EditServiceScreen.js b/src/containers/settings/EditServiceScreen.js index 43b461670..b84c0d5bb 100644 --- a/src/containers/settings/EditServiceScreen.js +++ b/src/containers/settings/EditServiceScreen.js | |||
@@ -23,7 +23,7 @@ import { config as proxyFeature } from '../../features/serviceProxy'; | |||
23 | import { SPELLCHECKER_LOCALES } from '../../i18n/languages'; | 23 | import { SPELLCHECKER_LOCALES } from '../../i18n/languages'; |
24 | 24 | ||
25 | import globalMessages from '../../i18n/globalMessages'; | 25 | import globalMessages from '../../i18n/globalMessages'; |
26 | import { DEFAULT_APP_SETTINGS } from '../../config'; | 26 | import { DEFAULT_APP_SETTINGS, DEFAULT_SERVICE_SETTINGS } from '../../config'; |
27 | 27 | ||
28 | const messages = defineMessages({ | 28 | const messages = defineMessages({ |
29 | name: { | 29 | name: { |
@@ -176,7 +176,7 @@ class EditServiceScreen extends Component { | |||
176 | isEnabled: { | 176 | isEnabled: { |
177 | label: intl.formatMessage(messages.enableService), | 177 | label: intl.formatMessage(messages.enableService), |
178 | value: service.isEnabled, | 178 | value: service.isEnabled, |
179 | default: true, | 179 | default: DEFAULT_SERVICE_SETTINGS.isEnabled, |
180 | }, | 180 | }, |
181 | isHibernationEnabled: { | 181 | isHibernationEnabled: { |
182 | label: intl.formatMessage(messages.enableHibernation), | 182 | label: intl.formatMessage(messages.enableHibernation), |
@@ -184,27 +184,27 @@ class EditServiceScreen extends Component { | |||
184 | action !== 'edit' | 184 | action !== 'edit' |
185 | ? recipe.autoHibernate | 185 | ? recipe.autoHibernate |
186 | : service.isHibernationEnabled, | 186 | : service.isHibernationEnabled, |
187 | default: true, | 187 | default: DEFAULT_SERVICE_SETTINGS.isHibernationEnabled, |
188 | }, | 188 | }, |
189 | isWakeUpEnabled: { | 189 | isWakeUpEnabled: { |
190 | label: intl.formatMessage(messages.enableWakeUp), | 190 | label: intl.formatMessage(messages.enableWakeUp), |
191 | value: service.isWakeUpEnabled, | 191 | value: service.isWakeUpEnabled, |
192 | default: true, | 192 | default: DEFAULT_SERVICE_SETTINGS.isWakeUpEnabled, |
193 | }, | 193 | }, |
194 | isNotificationEnabled: { | 194 | isNotificationEnabled: { |
195 | label: intl.formatMessage(messages.enableNotification), | 195 | label: intl.formatMessage(messages.enableNotification), |
196 | value: service.isNotificationEnabled, | 196 | value: service.isNotificationEnabled, |
197 | default: true, | 197 | default: DEFAULT_SERVICE_SETTINGS.isNotificationEnabled, |
198 | }, | 198 | }, |
199 | isBadgeEnabled: { | 199 | isBadgeEnabled: { |
200 | label: intl.formatMessage(messages.enableBadge), | 200 | label: intl.formatMessage(messages.enableBadge), |
201 | value: service.isBadgeEnabled, | 201 | value: service.isBadgeEnabled, |
202 | default: true, | 202 | default: DEFAULT_SERVICE_SETTINGS.isBadgeEnabled, |
203 | }, | 203 | }, |
204 | isMuted: { | 204 | isMuted: { |
205 | label: intl.formatMessage(messages.enableAudio), | 205 | label: intl.formatMessage(messages.enableAudio), |
206 | value: !service.isMuted, | 206 | value: !service.isMuted, |
207 | default: true, | 207 | default: DEFAULT_SERVICE_SETTINGS.isMuted, |
208 | }, | 208 | }, |
209 | customIcon: { | 209 | customIcon: { |
210 | label: intl.formatMessage(messages.icon), | 210 | label: intl.formatMessage(messages.icon), |
@@ -298,7 +298,7 @@ class EditServiceScreen extends Component { | |||
298 | isIndirectMessageBadgeEnabled: { | 298 | isIndirectMessageBadgeEnabled: { |
299 | label: intl.formatMessage(messages.indirectMessages), | 299 | label: intl.formatMessage(messages.indirectMessages), |
300 | value: service.isIndirectMessageBadgeEnabled, | 300 | value: service.isIndirectMessageBadgeEnabled, |
301 | default: true, | 301 | default: DEFAULT_SERVICE_SETTINGS.hasIndirectMessages, |
302 | }, | 302 | }, |
303 | }); | 303 | }); |
304 | } | 304 | } |