Show a context menu item when not signed into any accounts

This commit is contained in:
Rachel Macfarlane
2020-04-15 16:18:04 -07:00
parent 7130a3340b
commit 197ac4ce64
2 changed files with 37 additions and 3 deletions

View File

@@ -68,8 +68,14 @@ export class MainThreadAuthenticationProvider extends Disposable {
private readonly notificationService: INotificationService
) {
super();
}
this.registerCommandsAndContextMenuItems();
public async initialize(): Promise<void> {
return this.registerCommandsAndContextMenuItems();
}
public hasSessions(): boolean {
return !!this._sessions.size;
}
private manageTrustedExtensions(quickInputService: IQuickInputService, storageService: IStorageService, accountName: string) {
@@ -309,6 +315,7 @@ export class MainThreadAuthentication extends Disposable implements MainThreadAu
async $registerAuthenticationProvider(id: string, displayName: string, supportsMultipleAccounts: boolean): Promise<void> {
const provider = new MainThreadAuthenticationProvider(this._proxy, id, displayName, supportsMultipleAccounts, this.notificationService);
await provider.initialize();
this.authenticationService.registerAuthenticationProvider(id, provider);
}