mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
* Convert runManyFor to use composite Signed-off-by: Sebastian Malton <sebastian@malton.name> * Convert runManySyncFor to use composite and to enfore sync-ness Signed-off-by: Sebastian Malton <sebastian@malton.name> * Remove dead code Signed-off-by: Sebastian Malton <sebastian@malton.name> * Convert getStartableStoppable to be always sync as it is never used in an async fashion Signed-off-by: Sebastian Malton <sebastian@malton.name> * Convert all sync runnables to comply with new checks for sync-ness Signed-off-by: Sebastian Malton <sebastian@malton.name> Signed-off-by: Sebastian Malton <sebastian@malton.name>
27 lines
925 B
TypeScript
27 lines
925 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 electronTrayInjectable from "./electron-tray.injectable";
|
|
import { beforeQuitOfBackEndInjectionToken } from "../../start-main-application/runnable-tokens/before-quit-of-back-end-injection-token";
|
|
import stopReactiveTrayMenuItemsInjectable from "../reactive-tray-menu-items/stop-reactive-tray-menu-items.injectable";
|
|
|
|
const stopTrayInjectable = getInjectable({
|
|
id: "stop-tray",
|
|
|
|
instantiate: (di) => {
|
|
const electronTray = di.inject(electronTrayInjectable);
|
|
|
|
return {
|
|
id: "stop-tray",
|
|
run: () => void electronTray.stop(),
|
|
runAfter: di.inject(stopReactiveTrayMenuItemsInjectable),
|
|
};
|
|
},
|
|
|
|
injectionToken: beforeQuitOfBackEndInjectionToken,
|
|
});
|
|
|
|
export default stopTrayInjectable;
|