提交 998e5e2e 编写于 作者: R Rachel Macfarlane

onDidChangePassword -> onDidChange in secrets API

上级 1bb2ae0e
......@@ -40,7 +40,7 @@ export class GitHubAuthenticationProvider {
// Ignore, network request failed
}
context.subscriptions.push(context.secretState.onDidChangePassword(() => this.checkForUpdates()));
context.subscriptions.push(context.secretState.onDidChange(() => this.checkForUpdates()));
}
private async verifySessions(): Promise<void> {
......
......@@ -149,7 +149,7 @@ export class AzureActiveDirectoryService {
}
}
this._disposables.push(this._context.secretState.onDidChangePassword(() => this.checkForUpdates));
this._disposables.push(this._context.secretState.onDidChange(() => this.checkForUpdates));
}
private parseStoredData(data: string): IStoredSession[] {
......
......@@ -2367,7 +2367,7 @@ declare module 'vscode' {
/**
* Fires when a secret is set or deleted.
*/
onDidChangePassword: Event<void>;
onDidChange: Event<void>;
}
export interface ExtensionContext {
secretState: SecretState;
......
......@@ -14,15 +14,15 @@ export class ExtensionSecrets implements vscode.SecretState {
protected readonly _id: string;
protected readonly _secretState: ExtHostSecretState;
private _onDidChangePassword = new Emitter<void>();
readonly onDidChangePassword: Event<void> = this._onDidChangePassword.event;
private _onDidChange = new Emitter<void>();
readonly onDidChange: Event<void> = this._onDidChange.event;
constructor(extensionDescription: IExtensionDescription, secretState: ExtHostSecretState) {
this._id = ExtensionIdentifier.toKey(extensionDescription.identifier);
this._secretState = secretState;
this._secretState.onDidChangePassword(_ => this._onDidChangePassword.fire());
this._secretState.onDidChangePassword(_ => this._onDidChange.fire());
}
get(key: string): Promise<string | undefined> {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册