From b86c1b15e85dda523a2b42548e2275e693c3066a Mon Sep 17 00:00:00 2001 From: Mylloon <29067904+Mylloon@users.noreply.github.com> Date: Mon, 2 Sep 2024 11:57:16 +0200 Subject: [PATCH] fix: notification title on windows (#2139) * fix windows notification title * Update src/main/index.ts --------- Co-authored-by: Mikael Finstad --- src/main/index.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/main/index.ts b/src/main/index.ts index b3ca2302..f2cc6853 100644 --- a/src/main/index.ts +++ b/src/main/index.ts @@ -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'; @@ -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;