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

@@ -22,7 +22,7 @@ import { IConfigurationService } from 'vs/platform/configuration/common/configur
import * as azdata from 'azdata';
import { Button } from 'sql/base/browser/ui/button/button';
import { Modal } from 'sql/workbench/browser/modal/modal';
import { HideReason, Modal } from 'sql/workbench/browser/modal/modal';
import { AccountViewModel } from 'sql/platform/accounts/common/accountViewModel';
import { AddAccountAction } from 'sql/platform/accounts/common/accountActions';
import { AccountListRenderer, AccountListDelegate } from 'sql/workbench/services/accountManagement/browser/accountListRenderer';
@@ -272,12 +272,12 @@ export class AccountDialog extends Modal {
/* Overwrite enter key behavior */
protected onAccept() {
this.close();
this.close('ok');
}
public close() {
public close(hideReason: HideReason = 'close') {
this._onCloseEmitter.fire();
this.hide();
this.hide(hideReason);
}
public open() {

View File

@@ -142,7 +142,7 @@ export class AutoOAuthDialog extends Modal {
this._copyAndOpenButton!.enabled = true;
this._onCloseEvent.fire();
this.spinner = false;
this.hide();
this.hide('close');
}
public open(title: string, message: string, userCode: string, uri: string) {