Make temporal dependency apparent

Co-authored-by: Mikko Aspiala <mikko.aspiala@gmail.com>

Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
This commit is contained in:
Janne SavolainenandMikko Aspiala committed 2022-05-11 08:25:28 +03:00
1 parent c9832a2702
commit 1e4a140a55
3 files changed
+28 -2

No files matched your search

+1 -1
View File
@@ -44,8 +44,8 @@ export class HotbarStore extends BaseStore<HotbarStoreModel> {
},
migrations,
});
makeObservable(this);
this.load();
}
@computed get activeHotbarId() {
@@ -0,0 +1,26 @@
/**
* 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;
+1 -1
View File
@@ -122,7 +122,7 @@ export async function bootstrap(di: DiContainer) {
await clusterStore.loadInitialOnRenderer();
// HotbarStore depends on: ClusterStore
di.inject(hotbarStoreInjectable);
di.inject(hotbarStoreInjectable).load();
// ThemeStore depends on: UserStore
// TODO: Remove temporal dependencies