Polish onDidChangePassword changes

This commit is contained in:
Rachel Macfarlane
2020-10-12 10:31:00 -07:00
parent 9910c38005
commit 31419adc34
9 changed files with 15 additions and 22 deletions

View File

@@ -26,14 +26,14 @@ export class GitHubAuthenticationProvider {
private _sessions: vscode.AuthenticationSession[] = [];
private _githubServer = new GitHubServer();
public async initialize(): Promise<void> {
public async initialize(context: vscode.ExtensionContext): Promise<void> {
try {
this._sessions = await this.readSessions();
} catch (e) {
// Ignore, network request failed
}
keychain.onDidChangePassword(() => this.checkForUpdates());
context.subscriptions.push(vscode.authentication.onDidChangePassword(() => this.checkForUpdates()));
}
private async checkForUpdates() {