fix: unable to quit when auth dialog is opened (#804)

This commit is contained in:
Mingholy
2025-10-14 15:55:38 +08:00
committed by GitHub
parent 40810945e0
commit a779d44b38
4 changed files with 23 additions and 16 deletions

View File

@@ -61,16 +61,6 @@ export function useDialogClose(options: DialogCloseOptions) {
return true;
}
if (options.isAuthDialogOpen) {
// Mimic ESC behavior: only close if already authenticated (same as AuthDialog ESC logic)
if (options.selectedAuthType !== undefined) {
// Note: We don't await this since we want non-blocking behavior like ESC
void options.handleAuthSelect(undefined, SettingScope.User);
}
// Note: AuthDialog prevents ESC exit if not authenticated, we follow same logic
return true;
}
if (options.isEditorDialogOpen) {
// Mimic ESC behavior: call onExit() directly
options.exitEditorDialog();