mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
chore: Rename exitApp to forceAppExit
Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
1 parent
8ee65f841e
commit
802cbdb096
6 files changed
+23
-23
No files matched your search
+3
-3
@@ -5,8 +5,8 @@
|
||||
import { getInjectable } from "@ogre-tools/injectable";
|
||||
import electronAppInjectable from "../electron-app.injectable";
|
||||
|
||||
const exitAppInjectable = getInjectable({
|
||||
id: "exit-app",
|
||||
const forceAppExitInjectable = getInjectable({
|
||||
id: "force-app-exit",
|
||||
|
||||
instantiate: (di) => () => {
|
||||
const app = di.inject(electronAppInjectable);
|
||||
@@ -15,4 +15,4 @@ const exitAppInjectable = getInjectable({
|
||||
},
|
||||
});
|
||||
|
||||
export default exitAppInjectable;
|
||||
export default forceAppExitInjectable;
|
||||
+3
-3
@@ -5,7 +5,7 @@
|
||||
import { getInjectable } from "@ogre-tools/injectable";
|
||||
import { beforeElectronIsReadyInjectionToken } from "@k8slens/application-for-electron-main";
|
||||
import requestSingleInstanceLockInjectable from "../features/request-single-instance-lock.injectable";
|
||||
import exitAppInjectable from "../features/exit-app.injectable";
|
||||
import forceAppExitInjectable from "../features/force-app-exit.injectable";
|
||||
|
||||
const enforceSingleApplicationInstanceInjectable = getInjectable({
|
||||
id: "enforce-single-application-instance",
|
||||
@@ -13,10 +13,10 @@ const enforceSingleApplicationInstanceInjectable = getInjectable({
|
||||
instantiate: (di) => ({
|
||||
run: () => {
|
||||
const requestSingleInstanceLock = di.inject(requestSingleInstanceLockInjectable);
|
||||
const exitApp = di.inject(exitAppInjectable);
|
||||
const forceAppExit = di.inject(forceAppExitInjectable);
|
||||
|
||||
if (!requestSingleInstanceLock()) {
|
||||
exitApp();
|
||||
forceAppExit();
|
||||
}
|
||||
|
||||
return undefined;
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
*/
|
||||
import { getInjectable } from "@ogre-tools/injectable";
|
||||
import powerMonitorInjectable from "../features/power-monitor.injectable";
|
||||
import exitAppInjectable from "../features/exit-app.injectable";
|
||||
import forceAppExitInjectable from "../features/force-app-exit.injectable";
|
||||
import { onLoadOfApplicationInjectionToken } from "@k8slens/application";
|
||||
|
||||
const setupDeviceShutdownInjectable = getInjectable({
|
||||
@@ -13,9 +13,9 @@ const setupDeviceShutdownInjectable = getInjectable({
|
||||
instantiate: (di) => ({
|
||||
run: () => {
|
||||
const powerMonitor = di.inject(powerMonitorInjectable);
|
||||
const exitApp = di.inject(exitAppInjectable);
|
||||
const forceAppExit = di.inject(forceAppExitInjectable);
|
||||
|
||||
powerMonitor.on("shutdown", exitApp);
|
||||
powerMonitor.on("shutdown", forceAppExit);
|
||||
},
|
||||
}),
|
||||
|
||||
|
||||
Reference in new issue
Block a user