Do not show option to sign into GitHub when already signed in for preferences sync, fixes #97735

This commit is contained in:
Rachel Macfarlane
2020-06-01 10:24:54 -07:00
parent 876ae118fe
commit ae684437a3

View File

@@ -365,8 +365,11 @@ export class UserDataSyncWorkbenchService extends Disposable implements IUserDat
// Account proviers
for (const authenticationProvider of this.authenticationProviders) {
const providerName = this.authenticationService.getDisplayName(authenticationProvider.id);
quickPickItems.push({ label: localize('sign in using account', "Sign in with {0}", providerName), authenticationProvider });
const signedInForProvider = this.all.some(account => account.authenticationProviderId === authenticationProvider.id);
if (!signedInForProvider || this.authenticationService.supportsMultipleAccounts(authenticationProvider.id)) {
const providerName = this.authenticationService.getDisplayName(authenticationProvider.id);
quickPickItems.push({ label: localize('sign in using account', "Sign in with {0}", providerName), authenticationProvider });
}
}
return quickPickItems;