diff --git a/src/main/initializers/ipc.ts b/src/main/initializers/ipc.ts index 9bea35ce2c..1c23c167ec 100644 --- a/src/main/initializers/ipc.ts +++ b/src/main/initializers/ipc.ts @@ -77,6 +77,7 @@ export function initIpcMainHandlers() { }); ipcMainHandle(clusterDeleteHandler, (event, clusterId: ClusterId) => { + appEventBus.emit({ name: "cluster", action: "remove" }); const cluster = ClusterStore.getInstance().getById(clusterId); if (!cluster) { diff --git a/src/renderer/initializers/catalog.tsx b/src/renderer/initializers/catalog.tsx index 466899aab0..c7f35829f9 100644 --- a/src/renderer/initializers/catalog.tsx +++ b/src/renderer/initializers/catalog.tsx @@ -24,7 +24,6 @@ import fs from "fs"; import "../../common/catalog-entities/kubernetes-cluster"; import { WebLinkCategory } from "../../common/catalog-entities"; import { ClusterStore } from "../../common/cluster-store"; -import { appEventBus } from "../../common/event-bus"; import { catalogCategoryRegistry } from "../api/catalog-category-registry"; import { WeblinkAddCommand } from "../components/catalog-entities/weblink-add-command"; import { CommandOverlay } from "../components/command-palette"; @@ -50,7 +49,6 @@ function initKubernetesClusters() { } async function onClusterDelete(clusterId: string) { - appEventBus.emit({ name: "cluster", action: "remove" }); const cluster = ClusterStore.getInstance().getById(clusterId); if (!cluster) {