mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Consolidate setup events to more granular timeslots
Co-authored-by: Mikko Aspiala <mikko.aspiala@gmail.com> Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
This commit is contained in:
1 parent
6fe0c2fce5
commit
0d3728dba3
4 files changed
+21
-13
No files matched your search
@@ -5,8 +5,8 @@
|
||||
import { getInjectable } from "@ogre-tools/injectable";
|
||||
import { AppPaths, appPathsIpcChannel } from "../../common/app-paths/app-path-injection-token";
|
||||
import getValueFromRegisteredChannelInjectable from "./get-value-from-registered-channel/get-value-from-registered-channel.injectable";
|
||||
import { setupableInjectionToken } from "../../common/setupable-injection-token/setupable-injection-token";
|
||||
import appPathsStateInjectable from "../../common/app-paths/app-paths-state.injectable";
|
||||
import { onApplicationIsReadyInjectionToken } from "../../main/start-main-application/on-application-is-ready/on-application-is-ready-injection-token";
|
||||
|
||||
let syncAppPaths: AppPaths;
|
||||
|
||||
@@ -14,7 +14,7 @@ const setupAppPathsInjectable = getInjectable({
|
||||
id: "setup-app-paths",
|
||||
|
||||
instantiate: (di) => ({
|
||||
runSetup: async () => {
|
||||
run: async () => {
|
||||
const getValueFromRegisteredChannel = di.inject(
|
||||
getValueFromRegisteredChannelInjectable,
|
||||
);
|
||||
@@ -27,7 +27,7 @@ const setupAppPathsInjectable = getInjectable({
|
||||
},
|
||||
}),
|
||||
|
||||
injectionToken: setupableInjectionToken,
|
||||
injectionToken: onApplicationIsReadyInjectionToken,
|
||||
});
|
||||
|
||||
export default setupAppPathsInjectable;
|
||||
@@ -5,13 +5,13 @@
|
||||
import { getInjectable } from "@ogre-tools/injectable";
|
||||
import { ipcChannelListenerInjectionToken } from "./ipc-channel-listener-injection-token";
|
||||
import registerIpcChannelListenerInjectable from "../app-paths/get-value-from-registered-channel/register-ipc-channel-listener.injectable";
|
||||
import { setupableInjectionToken } from "../../common/setupable-injection-token/setupable-injection-token";
|
||||
import { onApplicationIsReadyInjectionToken } from "../../main/start-main-application/on-application-is-ready/on-application-is-ready-injection-token";
|
||||
|
||||
const registerIpcChannelListenersInjectable = getInjectable({
|
||||
id: "register-ipc-channel-listeners",
|
||||
|
||||
instantiate: di => ({
|
||||
runSetup: async () => {
|
||||
run: async () => {
|
||||
const registerIpcChannelListener = di.inject(registerIpcChannelListenerInjectable);
|
||||
|
||||
const listeners = di.injectMany(ipcChannelListenerInjectionToken);
|
||||
@@ -22,7 +22,7 @@ const registerIpcChannelListenersInjectable = getInjectable({
|
||||
},
|
||||
}),
|
||||
|
||||
injectionToken: setupableInjectionToken,
|
||||
injectionToken: onApplicationIsReadyInjectionToken,
|
||||
});
|
||||
|
||||
export default registerIpcChannelListenersInjectable;
|
||||
Reference in new issue
Block a user