mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Remove global state
Co-authored-by: Mikko Aspiala <mikko.aspiala@gmail.com> Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
This commit is contained in:
parent
fc04a4e17f
commit
88fe9b1b75
@ -3,14 +3,11 @@
|
|||||||
* Licensed under MIT License. See LICENSE in root directory for more information.
|
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||||
*/
|
*/
|
||||||
import { getInjectable } from "@ogre-tools/injectable";
|
import { getInjectable } from "@ogre-tools/injectable";
|
||||||
import type { AppPaths } from "../../common/app-paths/app-path-injection-token";
|
|
||||||
import { appPathsIpcChannel } from "../../common/app-paths/app-path-injection-token";
|
import { appPathsIpcChannel } from "../../common/app-paths/app-path-injection-token";
|
||||||
import getValueFromRegisteredChannelInjectable from "./get-value-from-registered-channel/get-value-from-registered-channel.injectable";
|
import getValueFromRegisteredChannelInjectable from "./get-value-from-registered-channel/get-value-from-registered-channel.injectable";
|
||||||
import appPathsStateInjectable from "../../common/app-paths/app-paths-state.injectable";
|
import appPathsStateInjectable from "../../common/app-paths/app-paths-state.injectable";
|
||||||
import { beforeFrameStartsInjectionToken } from "../before-frame-starts/before-frame-starts-injection-token";
|
import { beforeFrameStartsInjectionToken } from "../before-frame-starts/before-frame-starts-injection-token";
|
||||||
|
|
||||||
let syncAppPaths: AppPaths;
|
|
||||||
|
|
||||||
const setupAppPathsInjectable = getInjectable({
|
const setupAppPathsInjectable = getInjectable({
|
||||||
id: "setup-app-paths",
|
id: "setup-app-paths",
|
||||||
|
|
||||||
@ -20,7 +17,7 @@ const setupAppPathsInjectable = getInjectable({
|
|||||||
getValueFromRegisteredChannelInjectable,
|
getValueFromRegisteredChannelInjectable,
|
||||||
);
|
);
|
||||||
|
|
||||||
syncAppPaths = await getValueFromRegisteredChannel(appPathsIpcChannel);
|
const syncAppPaths = await getValueFromRegisteredChannel(appPathsIpcChannel);
|
||||||
|
|
||||||
const appPathsState = di.inject(appPathsStateInjectable);
|
const appPathsState = di.inject(appPathsStateInjectable);
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user