From 385c403beede6a941911a000d6ab21f422ceed4e Mon Sep 17 00:00:00 2001 From: Shidorien Date: Fri, 24 Nov 2023 03:03:38 +0100 Subject: [PATCH] Update "havebeenupdated" when close index.html --- src/main/ipcs/window-manager-ipcs.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/main/ipcs/window-manager-ipcs.ts b/src/main/ipcs/window-manager-ipcs.ts index 94b54e6e..d71eef5b 100644 --- a/src/main/ipcs/window-manager-ipcs.ts +++ b/src/main/ipcs/window-manager-ipcs.ts @@ -3,11 +3,16 @@ import { AppWindow } from "shared/models/window-manager/app-window.model"; import { IpcService } from "../services/ipc.service"; import { from } from "rxjs"; import { BrowserWindow, ipcMain } from "electron"; +import { AutoUpdaterService } from "../services/auto-updater.service"; const ipc = IpcService.getInstance(); +const autoUpdaterService = AutoUpdaterService.getInstance(); // Native windows control, do not pass through IPC service ipcMain.on("close-window", async (event) => { + if (event.sender.getURL().includes("index.html")) { + autoUpdaterService.setHaveBeenUpdated(false); + } BrowserWindow.fromWebContents(event.sender)?.close(); });