Skip to content

Commit

Permalink
refs h3poteto#972 Set appId to notify in windows10
Browse files Browse the repository at this point in the history
  • Loading branch information
h3poteto committed Jul 23, 2019
1 parent e6ed146 commit de03ea8
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/main/index.ts
Expand Up @@ -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'
Expand Down Expand Up @@ -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')
Expand Down Expand Up @@ -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
*/
Expand Down
1 change: 1 addition & 0 deletions tsconfig.json
Expand Up @@ -10,6 +10,7 @@
"sourceMap": true,
"downlevelIteration": true,
"strict": true,
"resolveJsonModule": true,
"noImplicitAny": false,
"strictNullChecks": true,
"strictFunctionTypes": true,
Expand Down

0 comments on commit de03ea8

Please sign in to comment.