mirror of
				https://github.com/zulip/zulip-desktop.git
				synced 2025-11-03 21:43:18 +00:00 
			
		
		
		
	notification: Set the AppUserModelId from the main process.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
		@@ -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 {
 | 
			
		||||
 
 | 
			
		||||
@@ -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;
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user