Windows: correctly set notifications name - not electron.app.YOURAPPNAME (PR #1394)
This sets the name correctly for Windows notifications. Currently, notifications name shows as `electron.app.YOURAPPNAME`
This commit is contained in:
parent
60035a8e74
commit
513b9dc93d
|
@ -20,7 +20,7 @@ import {
|
|||
APP_ARGS_FILE_PATH,
|
||||
} from './components/mainWindow';
|
||||
import { createTrayIcon } from './components/trayIcon';
|
||||
import { isOSX, removeUserAgentSpecifics } from './helpers/helpers';
|
||||
import { isOSX, isWindows, removeUserAgentSpecifics } from './helpers/helpers';
|
||||
import { inferFlashPath } from './helpers/inferFlash';
|
||||
import * as log from './helpers/loggingHelper';
|
||||
import {
|
||||
|
@ -78,6 +78,13 @@ if (!appArgs.userAgentHonest) {
|
|||
}
|
||||
}
|
||||
|
||||
// this step is required to allow app names to be displayed correctly in notifications on windows
|
||||
// https://www.electronjs.org/docs/latest/api/app#appsetappusermodelidid-windows
|
||||
// https://www.electronjs.org/docs/latest/tutorial/notifications#windows
|
||||
if (isWindows()) {
|
||||
app.setAppUserModelId(app.getName());
|
||||
}
|
||||
|
||||
// Take in a URL on the command line as an override
|
||||
if (process.argv.length > 1) {
|
||||
const maybeUrl = process.argv[1];
|
||||
|
|
Loading…
Reference in New Issue