From 0d2cf841155b5db2f54c5d4cb14a00d5fc8eebf2 Mon Sep 17 00:00:00 2001 From: Jari Kolehmainen Date: Wed, 7 Apr 2021 18:38:12 +0300 Subject: [PATCH] cleanup Signed-off-by: Jari Kolehmainen --- src/extensions/registries/command-registry.ts | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/src/extensions/registries/command-registry.ts b/src/extensions/registries/command-registry.ts index 889f004f22..45af9121a1 100644 --- a/src/extensions/registries/command-registry.ts +++ b/src/extensions/registries/command-registry.ts @@ -1,10 +1,9 @@ // Extensions API -> Commands import { BaseRegistry } from "./base-registry"; -import { action, observable, reaction } from "mobx"; +import { action, observable } from "mobx"; import { LensExtension } from "../lens-extension"; import { CatalogEntity } from "../../common/catalog-entity"; -import { catalogEntityRegistry } from "../../common/catalog-entity-registry"; export type CommandContext = { entity?: CatalogEntity; @@ -35,16 +34,4 @@ export class CommandRegistry extends BaseRegistry { } } -export function syncCommandRegistryWithCatalog() { - reaction(() => catalogEntityRegistry.items, (items) => { - if (!commandRegistry.activeEntity) { - return; - } - - if (!items.includes(commandRegistry.activeEntity)) { - commandRegistry.activeEntity = null; - } - }); -} - export const commandRegistry = new CommandRegistry();