Merge from vscode 4c9161a3f125f5a788aafa73a4ecfcb27dcfc319 (#9143)

* Merge from vscode 4c9161a3f125f5a788aafa73a4ecfcb27dcfc319

* minor spacing fix
This commit is contained in:
Anthony Dresser
2020-02-13 21:20:36 -06:00
committed by GitHub
parent 0c56d44e4f
commit 71375808b9
57 changed files with 706 additions and 510 deletions

View File

@@ -147,13 +147,13 @@ export class UserDataSyncWorkbenchContribution extends Disposable implements IWo
}
if (sessions.length === 0) {
this.setActiveAccount(undefined);
await this.setActiveAccount(undefined);
return;
}
if (sessions.length === 1) {
this.logAuthenticatedEvent(sessions[0]);
this.setActiveAccount(sessions[0]);
await this.setActiveAccount(sessions[0]);
return;
}
@@ -167,7 +167,7 @@ export class UserDataSyncWorkbenchContribution extends Disposable implements IWo
if (selectedAccount) {
const selected = sessions.filter(account => selectedAccount.id === account.id)[0];
this.logAuthenticatedEvent(selected);
this.setActiveAccount(selected);
await this.setActiveAccount(selected);
}
}
@@ -565,7 +565,7 @@ export class UserDataSyncWorkbenchContribution extends Disposable implements IWo
private async signIn(): Promise<void> {
try {
this.setActiveAccount(await this.authenticationService.login(this.userDataSyncStore!.authenticationProviderId, ['https://management.core.windows.net/.default', 'offline_access']));
await this.setActiveAccount(await this.authenticationService.login(this.userDataSyncStore!.authenticationProviderId, ['https://management.core.windows.net/.default', 'offline_access']));
} catch (e) {
this.notificationService.error(e);
throw e;
@@ -575,7 +575,7 @@ export class UserDataSyncWorkbenchContribution extends Disposable implements IWo
private async signOut(): Promise<void> {
if (this.activeAccount) {
await this.authenticationService.logout(this.userDataSyncStore!.authenticationProviderId, this.activeAccount.id);
this.setActiveAccount(undefined);
await this.setActiveAccount(undefined);
}
}