diff options
Diffstat (limited to 'src/containers/settings/EditSettingsScreen.js')
-rw-r--r-- | src/containers/settings/EditSettingsScreen.js | 29 |
1 files changed, 26 insertions, 3 deletions
diff --git a/src/containers/settings/EditSettingsScreen.js b/src/containers/settings/EditSettingsScreen.js index 62e255dab..1fa7ce8bc 100644 --- a/src/containers/settings/EditSettingsScreen.js +++ b/src/containers/settings/EditSettingsScreen.js | |||
@@ -43,6 +43,10 @@ const messages = defineMessages({ | |||
43 | id: 'settings.app.form.showDisabledServices', | 43 | id: 'settings.app.form.showDisabledServices', |
44 | defaultMessage: '!!!Display disabled services tabs', | 44 | defaultMessage: '!!!Display disabled services tabs', |
45 | }, | 45 | }, |
46 | showMessageBadgeWhenMuted: { | ||
47 | id: 'settings.app.form.showMessagesBadgesWhenMuted', | ||
48 | defaultMessage: '!!!Show unread message badge when notifications are disabled', | ||
49 | }, | ||
46 | enableSpellchecking: { | 50 | enableSpellchecking: { |
47 | id: 'settings.app.form.enableSpellchecking', | 51 | id: 'settings.app.form.enableSpellchecking', |
48 | defaultMessage: '!!!Enable spell checking', | 52 | defaultMessage: '!!!Enable spell checking', |
@@ -85,6 +89,7 @@ export default class EditSettingsScreen extends Component { | |||
85 | enableSystemTray: settingsData.enableSystemTray, | 89 | enableSystemTray: settingsData.enableSystemTray, |
86 | minimizeToSystemTray: settingsData.minimizeToSystemTray, | 90 | minimizeToSystemTray: settingsData.minimizeToSystemTray, |
87 | showDisabledServices: settingsData.showDisabledServices, | 91 | showDisabledServices: settingsData.showDisabledServices, |
92 | showMessageBadgeWhenMuted: settingsData.showMessageBadgeWhenMuted, | ||
88 | enableSpellchecking: settingsData.enableSpellchecking, | 93 | enableSpellchecking: settingsData.enableSpellchecking, |
89 | // spellcheckingLanguage: settingsData.spellcheckingLanguage, | 94 | // spellcheckingLanguage: settingsData.spellcheckingLanguage, |
90 | locale: settingsData.locale, | 95 | locale: settingsData.locale, |
@@ -104,7 +109,7 @@ export default class EditSettingsScreen extends Component { | |||
104 | const { intl } = this.context; | 109 | const { intl } = this.context; |
105 | 110 | ||
106 | const locales = []; | 111 | const locales = []; |
107 | Object.keys(APP_LOCALES).forEach((key) => { | 112 | Object.keys(APP_LOCALES).sort(Intl.Collator().compare).forEach((key) => { |
108 | locales.push({ | 113 | locales.push({ |
109 | value: key, | 114 | value: key, |
110 | label: APP_LOCALES[key], | 115 | label: APP_LOCALES[key], |
@@ -154,6 +159,11 @@ export default class EditSettingsScreen extends Component { | |||
154 | value: settings.all.showDisabledServices, | 159 | value: settings.all.showDisabledServices, |
155 | default: DEFAULT_APP_SETTINGS.showDisabledServices, | 160 | default: DEFAULT_APP_SETTINGS.showDisabledServices, |
156 | }, | 161 | }, |
162 | showMessageBadgeWhenMuted: { | ||
163 | label: intl.formatMessage(messages.showMessageBadgeWhenMuted), | ||
164 | value: settings.all.showMessageBadgeWhenMuted, | ||
165 | default: DEFAULT_APP_SETTINGS.showMessageBadgeWhenMuted, | ||
166 | }, | ||
157 | enableSpellchecking: { | 167 | enableSpellchecking: { |
158 | label: intl.formatMessage(messages.enableSpellchecking), | 168 | label: intl.formatMessage(messages.enableSpellchecking), |
159 | value: settings.all.enableSpellchecking, | 169 | value: settings.all.enableSpellchecking, |
@@ -183,8 +193,17 @@ export default class EditSettingsScreen extends Component { | |||
183 | } | 193 | } |
184 | 194 | ||
185 | render() { | 195 | render() { |
186 | const { updateStatus, updateStatusTypes } = this.props.stores.app; | 196 | const { |
187 | const { checkForUpdates, installUpdate } = this.props.actions.app; | 197 | updateStatus, |
198 | cacheSize, | ||
199 | updateStatusTypes, | ||
200 | isClearingAllCache, | ||
201 | } = this.props.stores.app; | ||
202 | const { | ||
203 | checkForUpdates, | ||
204 | installUpdate, | ||
205 | clearAllCache, | ||
206 | } = this.props.actions.app; | ||
188 | const form = this.prepareForm(); | 207 | const form = this.prepareForm(); |
189 | 208 | ||
190 | return ( | 209 | return ( |
@@ -197,6 +216,9 @@ export default class EditSettingsScreen extends Component { | |||
197 | noUpdateAvailable={updateStatus === updateStatusTypes.NOT_AVAILABLE} | 216 | noUpdateAvailable={updateStatus === updateStatusTypes.NOT_AVAILABLE} |
198 | updateIsReadyToInstall={updateStatus === updateStatusTypes.DOWNLOADED} | 217 | updateIsReadyToInstall={updateStatus === updateStatusTypes.DOWNLOADED} |
199 | onSubmit={d => this.onSubmit(d)} | 218 | onSubmit={d => this.onSubmit(d)} |
219 | cacheSize={cacheSize} | ||
220 | isClearingAllCache={isClearingAllCache} | ||
221 | onClearAllCache={clearAllCache} | ||
200 | /> | 222 | /> |
201 | ); | 223 | ); |
202 | } | 224 | } |
@@ -213,6 +235,7 @@ EditSettingsScreen.wrappedComponent.propTypes = { | |||
213 | launchOnStartup: PropTypes.func.isRequired, | 235 | launchOnStartup: PropTypes.func.isRequired, |
214 | checkForUpdates: PropTypes.func.isRequired, | 236 | checkForUpdates: PropTypes.func.isRequired, |
215 | installUpdate: PropTypes.func.isRequired, | 237 | installUpdate: PropTypes.func.isRequired, |
238 | clearAllCache: PropTypes.func.isRequired, | ||
216 | }).isRequired, | 239 | }).isRequired, |
217 | settings: PropTypes.shape({ | 240 | settings: PropTypes.shape({ |
218 | update: PropTypes.func.isRequired, | 241 | update: PropTypes.func.isRequired, |