Skip to content

Commit 6b20f91

Browse files
committed
-Allow notifications on Windows
1 parent 4229cc6 commit 6b20f91

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/background.js

+8
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import { baseMenuTemplate } from './menu/base_menu_template';
1111
import { devMenuTemplate } from './menu/dev_menu_template';
1212
import { helpMenuTemplate } from './menu/help_menu_template';
1313
import createWindow from './helpers/window';
14+
import { IS_WINDOWS } from './constants';
1415

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

37+
if (IS_WINDOWS) {
38+
// Stupid, DUMB calls that have to be made to let notifications come through on Windows (only Windows 10?)
39+
// See: https://github.com/electron/electron/issues/10864#issuecomment-382519150
40+
app.setAppUserModelId('com.knepper.android-messages-desktop');
41+
app.setAsDefaultProtocolClient('android-messages-desktop');
42+
}
43+
3644
app.on('ready', () => {
3745
setApplicationMenu();
3846
autoUpdater.checkForUpdatesAndNotify();

0 commit comments

Comments
 (0)