Unified the sketch close and the app quit logic.

Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
This commit is contained in:
Akos Kitta
2022-08-25 15:35:54 +02:00
committed by Akos Kitta
parent 0c87fa9877
commit 40425d49e0
5 changed files with 113 additions and 64 deletions

View File

@@ -5,6 +5,7 @@ import {
CommonCommands,
} from '@theia/core/lib/browser/common-frontend-contribution';
import { CommandRegistry } from '@theia/core/lib/common/command';
import type { OnWillStopAction } from '@theia/core/lib/browser/frontend-application';
@injectable()
export class CommonFrontendContribution extends TheiaCommonFrontendContribution {
@@ -48,4 +49,9 @@ export class CommonFrontendContribution extends TheiaCommonFrontendContribution
registry.unregisterMenuAction(command);
}
}
override onWillStop(): OnWillStopAction | undefined {
// This is NOOP here. All window close and app quit requests are handled in the `Close` contribution.
return undefined;
}
}