mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-20 01:25:37 -05:00
Clean up dialog event hide reasons (#14566)
* Clean up dialog event hide reasons * Remove done
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user