Skip to content

Commit

Permalink
-Allow notifications on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisknepper committed Jun 22, 2018
1 parent 4229cc6 commit 6b20f91
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/background.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import { baseMenuTemplate } from './menu/base_menu_template';
import { devMenuTemplate } from './menu/dev_menu_template';
import { helpMenuTemplate } from './menu/help_menu_template';
import createWindow from './helpers/window';
import { IS_WINDOWS } from './constants';

// Special module holding environment variables which you declared
// in config/env_xxx.json file.
Expand All @@ -33,6 +34,13 @@ if (env.name !== 'production') {
app.setPath('userData', `${userDataPath} (${env.name})`);
}

if (IS_WINDOWS) {
// Stupid, DUMB calls that have to be made to let notifications come through on Windows (only Windows 10?)
// See: https://github.com/electron/electron/issues/10864#issuecomment-382519150
app.setAppUserModelId('com.knepper.android-messages-desktop');
app.setAsDefaultProtocolClient('android-messages-desktop');
}

app.on('ready', () => {
setApplicationMenu();
autoUpdater.checkForUpdatesAndNotify();
Expand Down

0 comments on commit 6b20f91

Please sign in to comment.