Skip to content

Commit ae68443

Browse files
author
Rachel Macfarlane
committed
Do not show option to sign into GitHub when already signed in for preferences sync, fixes microsoft#97735
1 parent 876ae11 commit ae68443

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

src/vs/workbench/services/userDataSync/browser/userDataSyncWorkbenchService.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -365,8 +365,11 @@ export class UserDataSyncWorkbenchService extends Disposable implements IUserDat
365365

366366
// Account proviers
367367
for (const authenticationProvider of this.authenticationProviders) {
368-
const providerName = this.authenticationService.getDisplayName(authenticationProvider.id);
369-
quickPickItems.push({ label: localize('sign in using account', "Sign in with {0}", providerName), authenticationProvider });
368+
const signedInForProvider = this.all.some(account => account.authenticationProviderId === authenticationProvider.id);
369+
if (!signedInForProvider || this.authenticationService.supportsMultipleAccounts(authenticationProvider.id)) {
370+
const providerName = this.authenticationService.getDisplayName(authenticationProvider.id);
371+
quickPickItems.push({ label: localize('sign in using account', "Sign in with {0}", providerName), authenticationProvider });
372+
}
370373
}
371374

372375
return quickPickItems;

0 commit comments

Comments
 (0)