mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
chore: Remove closing windows on quit
- Electron does this already Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
parent
9d181ab6ab
commit
980b054fad
@ -6,7 +6,6 @@ import { getInjectable } from "@ogre-tools/injectable";
|
|||||||
import forceAppExitInjectable from "./electron-app/features/force-app-exit.injectable";
|
import forceAppExitInjectable from "./electron-app/features/force-app-exit.injectable";
|
||||||
import clusterManagerInjectable from "./cluster/manager.injectable";
|
import clusterManagerInjectable from "./cluster/manager.injectable";
|
||||||
import loggerInjectable from "../common/logger.injectable";
|
import loggerInjectable from "../common/logger.injectable";
|
||||||
import closeAllWindowsInjectable from "./start-main-application/lens-window/hide-all-windows/close-all-windows.injectable";
|
|
||||||
import emitAppEventInjectable from "../common/app-event-bus/emit-event.injectable";
|
import emitAppEventInjectable from "../common/app-event-bus/emit-event.injectable";
|
||||||
|
|
||||||
const stopServicesAndExitAppInjectable = getInjectable({
|
const stopServicesAndExitAppInjectable = getInjectable({
|
||||||
@ -16,12 +15,10 @@ const stopServicesAndExitAppInjectable = getInjectable({
|
|||||||
const forceAppExit = di.inject(forceAppExitInjectable);
|
const forceAppExit = di.inject(forceAppExitInjectable);
|
||||||
const clusterManager = di.inject(clusterManagerInjectable);
|
const clusterManager = di.inject(clusterManagerInjectable);
|
||||||
const logger = di.inject(loggerInjectable);
|
const logger = di.inject(loggerInjectable);
|
||||||
const closeAllWindows = di.inject(closeAllWindowsInjectable);
|
|
||||||
const emitAppEvent = di.inject(emitAppEventInjectable);
|
const emitAppEvent = di.inject(emitAppEventInjectable);
|
||||||
|
|
||||||
return async () => {
|
return async () => {
|
||||||
emitAppEvent({ name: "service", action: "close" });
|
emitAppEvent({ name: "service", action: "close" });
|
||||||
closeAllWindows();
|
|
||||||
clusterManager.stop();
|
clusterManager.stop();
|
||||||
logger.info("SERVICE:QUIT");
|
logger.info("SERVICE:QUIT");
|
||||||
setTimeout(forceAppExit, 1000);
|
setTimeout(forceAppExit, 1000);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user