Skip to content

Commit

Permalink
fix: notification title on windows (#2139)
Browse files Browse the repository at this point in the history
* fix windows notification title

* Update src/main/index.ts

---------

Co-authored-by: Mikael Finstad <[email protected]>
  • Loading branch information
Mylloon and mifi authored Sep 2, 2024
1 parent 87bb9df commit b86c1b1
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/main/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import timers from 'node:timers/promises';
import logger from './logger.js';
import menu from './menu.js';
import * as configStore from './configStore.js';
import { isLinux } from './util.js';
import { isLinux, isWindows } from './util.js';
import { appName, copyrightYear } from './common.js';
import attachContextMenu from './contextMenu.js';
import HttpServer from './httpServer.js';
Expand Down Expand Up @@ -71,6 +71,13 @@ const appVersion = app.getVersion();

app.name = appName;

if (isWindows) {
// in order to set the title on OS notifications on Windows, this needs to be set to app.name
// https://github.com/mifi/lossless-cut/pull/2139
// https://stackoverflow.com/a/65863174/6519037
app.setAppUserModelId(app.name);
}

const isStoreBuild = process.windowsStore || process.mas;

const showVersion = !isStoreBuild;
Expand Down

0 comments on commit b86c1b1

Please sign in to comment.