notification: Set the AppUserModelId from the main process.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
Anders Kaseorg
2022-02-03 22:55:15 -08:00
parent a41a771923
commit 4b93298b58
3 changed files with 3 additions and 12 deletions

View File

@@ -1,8 +1,5 @@
import {ipcRenderer} from "../typed-ipc-renderer";
// Do not change this
export const appId = "org.zulip.zulip-electron";
// This function will focus the server that sent
// the notification. Main function implemented in main.js
export function focusCurrentServer(): void {

View File

@@ -1,13 +1,4 @@
import {remote} from "electron";
import DefaultNotification from "./default-notification";
import {appId} from "./helpers";
const {app} = remote;
// From https://github.com/felixrieseberg/electron-windows-notifications#appusermodelid
// On windows 8 we have to explicitly set the appUserModelId otherwise notification won't work.
app.setAppUserModelId(appId);
export interface NotificationData {
close: () => void;