mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-25 19:18:59 +01:00
Make onDidChangeSessions event for auth providers fire complete session
This commit is contained in:
@@ -122,10 +122,9 @@ export class MainThreadAuthenticationProvider extends Disposable {
|
||||
|
||||
async updateSessionItems(event: modes.AuthenticationSessionsChangeEvent): Promise<void> {
|
||||
const { added, removed } = event;
|
||||
const session = await this._proxy.$getSessions(this.id);
|
||||
const addedSessions = session.filter(session => added.some(id => id === session.id));
|
||||
|
||||
removed.forEach(sessionId => {
|
||||
removed.forEach(session => {
|
||||
const sessionId = session.id;
|
||||
const accountName = this._sessions.get(sessionId);
|
||||
if (accountName) {
|
||||
this._sessions.delete(sessionId);
|
||||
@@ -139,7 +138,7 @@ export class MainThreadAuthenticationProvider extends Disposable {
|
||||
}
|
||||
});
|
||||
|
||||
addedSessions.forEach(session => this.registerSession(session));
|
||||
added.forEach(session => this.registerSession(session));
|
||||
}
|
||||
|
||||
login(scopes: string[]): Promise<modes.AuthenticationSession> {
|
||||
|
||||
Reference in New Issue
Block a user