INNER CODE UNIT · TypeScript
release
elie222/inbox-zero · apps/desktop/src/main.ts:161
const release = () => {
if (mailNotifications.get(mail.emailAccountId) === notification) {
mailNotifications.delete(mail.emailAccountId);
}
};
notification.on("close", release);
notification.on("failed", release);
notification.show();
});
ipcMain.handle("desktop:open-window", (event, path: unknown) => {
if (!isTrustedDesktopEvent(event)) return;
const callbackPath = normalizeDesktopCallbackPath(path);
if (!callbackPath) return;
const url = new URL(callbackPath, appOrigin).toString();
if (!isAllowedDesktopNavigation(url, appOrigin, localMailRendererFile))
return;
openAppWindow(url, { navigate: true });
});