From de03ea802ac81433c36f8ef5d40a3c97a82a6425 Mon Sep 17 00:00:00 2001
From: AkiraFukushima
Date: Wed, 24 Jul 2019 01:14:43 +0900
Subject: [PATCH] refs #972 Set appId to notify in windows10
---
src/main/index.ts | 9 +++++++++
tsconfig.json | 1 +
2 files changed, 10 insertions(+)
diff --git a/src/main/index.ts b/src/main/index.ts
index bf576390..2533277d 100644
--- a/src/main/index.ts
+++ b/src/main/index.ts
@@ -25,6 +25,7 @@ import openAboutWindow from 'about-window'
import { Status, Notification as RemoteNotification, Account as RemoteAccount } from 'megalodon'
import sanitizeHtml from 'sanitize-html'
+import pkg from '~/package.json'
import Authentication from './auth'
import Account from './account'
import StreamingManager from './streamingManager'
@@ -70,6 +71,8 @@ let mainWindow: BrowserWindow | null
let tray: Tray | null
const winURL = process.env.NODE_ENV === 'development' ? `http://localhost:9080` : `file://${__dirname}/index.html`
+const appId = pkg.build.appId
+
const splashURL =
process.env.NODE_ENV === 'development'
? path.resolve(__dirname, '../../static/splash-screen.html')
@@ -196,6 +199,12 @@ async function createWindow() {
app.dock.setMenu(dockMenu)
}
+ /**
+ * Windows10 don' notify, so we have to set appId
+ * https://github.com/electron/electron/issues/10864
+ */
+ app.setAppUserModelId(appId)
+
/**
* Enable accessibility
*/
diff --git a/tsconfig.json b/tsconfig.json
index 0d48eb32..2a662b39 100644
--- a/tsconfig.json
+++ b/tsconfig.json
@@ -10,6 +10,7 @@
"sourceMap": true,
"downlevelIteration": true,
"strict": true,
+ "resolveJsonModule": true,
"noImplicitAny": false,
"strictNullChecks": true,
"strictFunctionTypes": true,