mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
- Allows for better error messages related to mismatched runAfter's so that mismatched injection tokens are easy to fix Signed-off-by: Sebastian Malton <sebastian@malton.name>
27 lines
759 B
TypeScript
27 lines
759 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 { onLoadOfApplicationInjectionToken } from "../../start-main-application/runnable-tokens/on-load-of-application-injection-token";
|
|
import electronTrayInjectable from "./electron-tray.injectable";
|
|
|
|
const startTrayInjectable = getInjectable({
|
|
id: "start-tray",
|
|
|
|
instantiate: (di) => {
|
|
const electronTray = di.inject(electronTrayInjectable);
|
|
|
|
return {
|
|
id: "start-tray",
|
|
run: () => {
|
|
electronTray.start();
|
|
},
|
|
};
|
|
},
|
|
|
|
injectionToken: onLoadOfApplicationInjectionToken,
|
|
});
|
|
|
|
export default startTrayInjectable;
|