Clean up dialog event hide reasons (#14566)

* Clean up dialog event hide reasons

* Remove done
This commit is contained in:
Charles Gagnon
2021-03-05 08:54:35 -08:00
committed by GitHub
parent 21019f7452
commit d2faf9075d
21 changed files with 67 additions and 58 deletions

View File

@@ -201,7 +201,7 @@ export class ConnectionDialogService implements IConnectionDialogService {
private handleOnCancel(params: INewConnectionParams): void {
if (this.ignoreNextConnect) {
this._connectionDialog.resetConnection();
this._connectionDialog.close();
this._connectionDialog.close('cancel');
this.ignoreNextConnect = false;
this._dialogDeferredPromise.resolve(undefined);
return;
@@ -229,7 +229,7 @@ export class ConnectionDialogService implements IConnectionDialogService {
private async handleDefaultOnConnect(params: INewConnectionParams, connection: IConnectionProfile): Promise<void> {
if (this.ignoreNextConnect) {
this._connectionDialog.resetConnection();
this._connectionDialog.close();
this._connectionDialog.close('ok');
this.ignoreNextConnect = false;
this._connecting = false;
this._dialogDeferredPromise.resolve(connection);
@@ -253,7 +253,7 @@ export class ConnectionDialogService implements IConnectionDialogService {
const connectionResult = await this._connectionManagementService.connectAndSaveProfile(connection, uri, options, params && params.input);
this._connecting = false;
if (connectionResult && connectionResult.connected) {
this._connectionDialog.close();
this._connectionDialog.close('ok');
if (this._dialogDeferredPromise) {
this._dialogDeferredPromise.resolve(connectionResult.connectionProfile);
}