1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00

Register quit-and-install ipc channel

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
This commit is contained in:
Alex Andreev 2022-05-30 13:05:06 +03:00
parent c0cfd3e42d
commit 315f0a73da

View File

@ -9,7 +9,7 @@ import { clusterActivateHandler, clusterSetFrameIdHandler, clusterVisibilityHand
import type { ClusterId } from "../../../../common/cluster-types"; import type { ClusterId } from "../../../../common/cluster-types";
import { ClusterStore } from "../../../../common/cluster-store/cluster-store"; import { ClusterStore } from "../../../../common/cluster-store/cluster-store";
import { appEventBus } from "../../../../common/app-event-bus/event-bus"; 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 type { CatalogEntityRegistry } from "../../../catalog";
import { pushCatalogToRenderer } from "../../../catalog-pusher"; import { pushCatalogToRenderer } from "../../../catalog-pusher";
import type { ClusterManager } from "../../../cluster-manager"; import type { ClusterManager } from "../../../cluster-manager";
@ -24,6 +24,7 @@ import { openFilePickingDialogChannel } from "../../../../common/ipc/dialog";
import { getNativeThemeChannel } from "../../../../common/ipc/native-theme"; import { getNativeThemeChannel } from "../../../../common/ipc/native-theme";
import type { Theme } from "../../../theme/operating-system-theme-state.injectable"; import type { Theme } from "../../../theme/operating-system-theme-state.injectable";
import type { AskUserForFilePaths } from "../../../ipc/ask-user-for-file-paths.injectable"; import type { AskUserForFilePaths } from "../../../ipc/ask-user-for-file-paths.injectable";
import { quitAndInstallUpdate } from "../../../app-updater";
interface Dependencies { interface Dependencies {
directoryForLensLocalStorage: string; directoryForLensLocalStorage: string;
@ -171,5 +172,9 @@ export const setupIpcMainHandlers = ({ applicationMenuItems, directoryForLensLoc
return operatingSystemTheme.get(); return operatingSystemTheme.get();
}); });
ipcMainOn(AutoUpdateQuitAndInstalledChannel, () => {
quitAndInstallUpdate();
});
clusterStore.provideInitialFromMain(); clusterStore.provideInitialFromMain();
}; };