Switch to using dependency over using explicit side-effect

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:28:12 +03:00
1 parent 82336d7a12
commit 1810a330cf
2 files changed
+7 -3

No files matched your search

@@ -12,6 +12,7 @@ import getAbsolutePathInjectable from "../../../../common/path/get-absolute-path
import catalogEntityRegistryInjectable from "../../../catalog/catalog-entity-registry.injectable";
import clusterStoreInjectable from "../../../../common/cluster-store/cluster-store.injectable";
import { whenApplicationIsLoadingInjectionToken } from "../../../start-main-application/runnable-tokens/when-application-is-loading-injection-token";
import currentOperatingSystemThemeInjectable from "../../../theme/current-operating-system-theme.injectable";
const setupIpcMainHandlersInjectable = getInjectable({
id: "setup-ipc-main-handlers",
@@ -28,6 +29,7 @@ const setupIpcMainHandlersInjectable = getInjectable({
const getAbsolutePath = di.inject(getAbsolutePathInjectable);
const catalogEntityRegistry = di.inject(catalogEntityRegistryInjectable);
const clusterStore = di.inject(clusterStoreInjectable);
const currentOperatingSystemTheme = di.inject(currentOperatingSystemThemeInjectable);
return {
run: () => {
@@ -40,6 +42,7 @@ const setupIpcMainHandlersInjectable = getInjectable({
clusterManager,
catalogEntityRegistry,
clusterStore,
currentOperatingSystemTheme,
});
},
};