1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00
lens/src/main/start-main-application/after-application-is-ready/implementations/setup-hotbar-store.injectable.ts
Janne Savolainen 1e4a140a55
Make temporal dependency apparent
Co-authored-by: Mikko Aspiala <mikko.aspiala@gmail.com>

Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
2022-05-11 08:25:28 +03:00

27 lines
907 B
TypeScript

/**
* Copyright (c) OpenLens Authors. All rights reserved.
* Licensed under MIT License. See LICENSE in root directory for more information.
*/
import { getInjectable } from "@ogre-tools/injectable";
import { afterApplicationIsReadyInjectionToken } from "../after-application-is-ready-injection-token";
import hotbarStoreInjectable from "../../../../common/hotbar-store.injectable";
import setupSyncingOfGeneralCatalogEntitiesInjectable from "./setup-syncing-of-general-catalog-entities.injectable";
const setupHotbarStoreInjectable = getInjectable({
id: "setup-hotbar-store",
instantiate: (di) => ({
run: () => {
const hotbarStore = di.inject(hotbarStoreInjectable);
hotbarStore.load();
},
runAfter: di.inject(setupSyncingOfGeneralCatalogEntitiesInjectable),
}),
injectionToken: afterApplicationIsReadyInjectionToken,
});
export default setupHotbarStoreInjectable;