diff --git a/src/browser/components/SettingsPage.jsx b/src/browser/components/SettingsPage.jsx
index 9d4d6ac2..a7b298c5 100644
--- a/src/browser/components/SettingsPage.jsx
+++ b/src/browser/components/SettingsPage.jsx
@@ -129,7 +129,9 @@ const SettingsPage = createReactClass({
version: settings.version,
minimizeToTray: this.state.minimizeToTray,
notifications: {
- flashWindow: this.state.notifications.flashWindow
+ flashWindow: this.state.notifications.flashWindow,
+ bounceIcon: this.state.notifications.bounceIcon,
+ bounceIconType: this.state.notifications.bounceIconType
},
showUnreadBadge: this.state.showUnreadBadge,
useSpellChecker: this.state.useSpellChecker,
@@ -219,11 +221,30 @@ const SettingsPage = createReactClass({
handleFlashWindow() {
this.setState({
notifications: {
+ ...this.state.notifications,
flashWindow: this.refs.flashWindow.props.checked ? 0 : 2
}
});
setImmediate(this.startSaveConfig, CONFIG_TYPE_APP_OPTIONS);
},
+ handleBounceIcon() {
+ this.setState({
+ notifications: {
+ ...this.state.notifications,
+ bounceIcon: !this.refs.bounceIcon.props.checked
+ }
+ });
+ setImmediate(this.startSaveConfig, CONFIG_TYPE_APP_OPTIONS);
+ },
+ handleBounceIconType(event) {
+ this.setState({
+ notifications: {
+ ...this.state.notifications,
+ bounceIconType: event.target.value
+ }
+ });
+ setImmediate(this.startSaveConfig, CONFIG_TYPE_APP_OPTIONS);
+ },
handleShowUnreadBadge() {
this.setState({
showUnreadBadge: !this.refs.showUnreadBadge.props.checked
@@ -419,6 +440,45 @@ const SettingsPage = createReactClass({
);
}
+ if (process.platform === 'darwin') {
+ options.push(
+
+ {'Bounce the dock icon'}
+
+ {'once'}
+ {' '}
+ {'until I open the app'}
+
+ {'If enabled, the dock icon bounces once or until the user opens the app when a new message is received.'}
+
+
+ );
+ }
+
if (process.platform === 'darwin' || process.platform === 'linux') {
options.push(
{
mainWindow.flashFrame(true);
}
}
+
+ if (process.platform === 'darwin' && config.notifications.bounceIcon) {
+ app.dock.bounce(config.notifications.bounceIconType);
+ }
});
ipcMain.on('update-title', (event, arg) => {