Stop executing the same code three times (#9835)

* Stop executing the same code three times

* Remove one more extra call
This commit is contained in:
Amir Omidi
2020-04-15 13:56:12 -07:00
committed by GitHub
parent e6d882c9b5
commit 97108bdeea
2 changed files with 0 additions and 3 deletions

View File

@@ -423,7 +423,6 @@ export class ConnectionDialogService implements IConnectionDialogService {
this._params = params;
this._inputModel = model;
return new Promise<void>((resolve, reject) => {
this.updateModelServerCapabilities(model);
// If connecting from a query editor set "save connection" to false
if (params && (params.input && params.connectionType === ConnectionType.editor ||
params.connectionType === ConnectionType.temporary)) {
@@ -455,7 +454,6 @@ export class ConnectionDialogService implements IConnectionDialogService {
this._connectionDialog.render();
}
this._connectionDialog.newConnectionParams = params;
this._connectionDialog.updateProvider(this._providerNameToDisplayNameMap[this._currentProviderType]);
const recentConnections: ConnectionProfile[] = this._connectionManagementService.getRecentConnections(params.providers);
await this._connectionDialog.open(recentConnections.length > 0);

View File

@@ -277,7 +277,6 @@ export class ConnectionDialogWidget extends Modal {
// Show connection form based on server type
DOM.clearNode(this._connectionUIContainer);
this._onShowUiComponent.fire({ selectedProviderDisplayName: selectedProviderDisplayName, container: this._connectionUIContainer });
this.initDialog();
}
private connect(element?: IConnectionProfile): void {