Windows: Electron notifications not showing the app logo but everywhere else it does

Viewed 207

The app logo is properly shown everywhere else but in the notification section where it displays an empty logo

enter image description here

I know that you can add a custom image for the notification passing a icon property like so:

           new Notification({
              title: 'Test Notification',
              body: 'This is a test notification',
              icon: path.join(__dirname, 'icon.png'),
            });

But that's not the logo I want to change.

The app when built also shows the correct logo elsewhere:

enter image description here

I also added an icon property when creating the BrowserWindow like advised here.

  splashWindow = new BrowserWindow({
    width: 320,
    height: 320,
    // more 
    icon: path.resolve(__dirname, 'icon.png'),
  });

I have been able to modify the app name to 'Awesome App' via setAppUserModelId like so:

ipcMain.on('app-ready', () => {
  if (process.platform === 'win32') {
    // somehow also change logo here? can't find it in the docs
    app.setAppUserModelId('Awesome app');
  }

This code is all in main.js.

And I've been checking the docs for the App class and there's a getFileIcon but it doesn't appear to be related to this.

0 Answers
Related