mirror of
https://github.com/Zagrios/bs-manager.git
synced 2026-07-03 14:08:25 +02:00
Update "havebeenupdated" when close index.html
This commit is contained in:
@@ -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();
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user