Browse Source

Added flash_frame option.

- This allows the user to enable/disable the frame flashing on new
  messages.
- Some people find it massively distracting, but would still like
  to receive notifications. Let's not force them to DND the app.
pull/1075/head
James Riley 8 years ago
parent
commit
8271ef1317
  1. 6
      app/view/preferences/Preferences.js
  2. 5
      electron/main.js
  3. 4
      resources/languages/en.js

6
app/view/preferences/Preferences.js

@ -101,6 +101,12 @@ Ext.define('Rambox.view.preferences.Preferences',{
,boxLabel: locale['preferences[5]']
,value: config.auto_launch
}
,{
xtype: 'checkbox'
,name: 'flash_frame'
,boxLabel: locale['preferences[flash_frame]']
,value: config.flash_frame
}
,{
xtype: 'checkbox'
,name: 'start_minimized'

5
electron/main.js

@ -22,6 +22,7 @@ const config = new Config({
,hide_menu_bar: false
,window_display_behavior: 'taskbar_tray'
,auto_launch: !isDev
,flash_frame: true
,window_close_behavior: 'keep_in_tray'
,start_minimized: false
,systemtray_indicator: true
@ -264,7 +265,9 @@ function updateBadge(title) {
app.setBadgeCount(messageCount);
}
if ( messageCount > 0 && !mainWindow.isFocused() ) mainWindow.flashFrame(true);
if ( messageCount > 0 && !mainWindow.isFocused() && config.get('flash_frame') ) {
mainWindow.flashFrame(true);
}
}
ipcMain.on('setBadge', function(event, messageCount, value) {

4
resources/languages/en.js

File diff suppressed because one or more lines are too long
Loading…
Cancel
Save