From 315f0a73dab8fcd51aeac240eda3f8fd3eea3ef7 Mon Sep 17 00:00:00 2001 From: Alex Andreev Date: Mon, 30 May 2022 13:05:06 +0300 Subject: [PATCH] Register quit-and-install ipc channel Signed-off-by: Alex Andreev --- .../setup-ipc-main-handlers/setup-ipc-main-handlers.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/main/electron-app/runnables/setup-ipc-main-handlers/setup-ipc-main-handlers.ts b/src/main/electron-app/runnables/setup-ipc-main-handlers/setup-ipc-main-handlers.ts index 9342696c77..68d1327774 100644 --- a/src/main/electron-app/runnables/setup-ipc-main-handlers/setup-ipc-main-handlers.ts +++ b/src/main/electron-app/runnables/setup-ipc-main-handlers/setup-ipc-main-handlers.ts @@ -9,7 +9,7 @@ import { clusterActivateHandler, clusterSetFrameIdHandler, clusterVisibilityHand import type { ClusterId } from "../../../../common/cluster-types"; import { ClusterStore } from "../../../../common/cluster-store/cluster-store"; import { appEventBus } from "../../../../common/app-event-bus/event-bus"; -import { broadcastMainChannel, broadcastMessage, ipcMainHandle, ipcMainOn } from "../../../../common/ipc"; +import { AutoUpdateQuitAndInstalledChannel, broadcastMainChannel, broadcastMessage, ipcMainHandle, ipcMainOn } from "../../../../common/ipc"; import type { CatalogEntityRegistry } from "../../../catalog"; import { pushCatalogToRenderer } from "../../../catalog-pusher"; import type { ClusterManager } from "../../../cluster-manager"; @@ -24,6 +24,7 @@ import { openFilePickingDialogChannel } from "../../../../common/ipc/dialog"; import { getNativeThemeChannel } from "../../../../common/ipc/native-theme"; import type { Theme } from "../../../theme/operating-system-theme-state.injectable"; import type { AskUserForFilePaths } from "../../../ipc/ask-user-for-file-paths.injectable"; +import { quitAndInstallUpdate } from "../../../app-updater"; interface Dependencies { directoryForLensLocalStorage: string; @@ -171,5 +172,9 @@ export const setupIpcMainHandlers = ({ applicationMenuItems, directoryForLensLoc return operatingSystemTheme.get(); }); + ipcMainOn(AutoUpdateQuitAndInstalledChannel, () => { + quitAndInstallUpdate(); + }); + clusterStore.provideInitialFromMain(); };