|
3 | 3 | * Licensed under the MIT License. See License.txt in the project root for license information.
|
4 | 4 | *--------------------------------------------------------------------------------------------*/
|
5 | 5 |
|
6 |
| -/* eslint-disable local/code-no-native-private */ |
7 |
| - |
8 | 6 | import { Disposable } from 'vs/base/common/lifecycle';
|
9 | 7 | import { localize } from 'vs/nls';
|
10 | 8 | import { Action2, MenuId, MenuRegistry, registerAction2 } from 'vs/platform/actions/common/actions';
|
@@ -40,7 +38,7 @@ export class EditSessionsWorkbenchService extends Disposable implements IEditSes
|
40 | 38 | private serverConfiguration = this.productService['editSessions.store'];
|
41 | 39 | private machineClient: IUserDataSyncMachinesService | undefined;
|
42 | 40 |
|
43 |
| - #authenticationInfo: { sessionId: string; token: string; providerId: string } | undefined; |
| 41 | + private authenticationInfo: { sessionId: string; token: string; providerId: string } | undefined; |
44 | 42 | private static CACHED_SESSION_STORAGE_KEY = 'editSessionAccountPreference';
|
45 | 43 |
|
46 | 44 | private initialized = false;
|
@@ -227,13 +225,13 @@ export class EditSessionsWorkbenchService extends Disposable implements IEditSes
|
227 | 225 | }
|
228 | 226 |
|
229 | 227 | // If we already have an existing auth session in memory, use that
|
230 |
| - if (this.#authenticationInfo !== undefined) { |
| 228 | + if (this.authenticationInfo !== undefined) { |
231 | 229 | return true;
|
232 | 230 | }
|
233 | 231 |
|
234 | 232 | const authenticationSession = await this.getAuthenticationSession(silent);
|
235 | 233 | if (authenticationSession !== undefined) {
|
236 |
| - this.#authenticationInfo = authenticationSession; |
| 234 | + this.authenticationInfo = authenticationSession; |
237 | 235 | this.storeClient.setAuthToken(authenticationSession.token, authenticationSession.providerId);
|
238 | 236 | }
|
239 | 237 |
|
@@ -436,25 +434,25 @@ export class EditSessionsWorkbenchService extends Disposable implements IEditSes
|
436 | 434 | && e.scope === StorageScope.APPLICATION
|
437 | 435 | ) {
|
438 | 436 | const newSessionId = this.existingSessionId;
|
439 |
| - const previousSessionId = this.#authenticationInfo?.sessionId; |
| 437 | + const previousSessionId = this.authenticationInfo?.sessionId; |
440 | 438 |
|
441 | 439 | if (previousSessionId !== newSessionId) {
|
442 | 440 | this.logService.trace(`Resetting authentication state because authentication session ID preference changed from ${previousSessionId} to ${newSessionId}.`);
|
443 |
| - this.#authenticationInfo = undefined; |
| 441 | + this.authenticationInfo = undefined; |
444 | 442 | this.initialized = false;
|
445 | 443 | }
|
446 | 444 | }
|
447 | 445 | }
|
448 | 446 |
|
449 | 447 | private clearAuthenticationPreference(): void {
|
450 |
| - this.#authenticationInfo = undefined; |
| 448 | + this.authenticationInfo = undefined; |
451 | 449 | this.initialized = false;
|
452 | 450 | this.existingSessionId = undefined;
|
453 | 451 | this.signedInContext.set(false);
|
454 | 452 | }
|
455 | 453 |
|
456 | 454 | private onDidChangeSessions(e: AuthenticationSessionsChangeEvent): void {
|
457 |
| - if (this.#authenticationInfo?.sessionId && e.removed.find(session => session.id === this.#authenticationInfo?.sessionId)) { |
| 455 | + if (this.authenticationInfo?.sessionId && e.removed.find(session => session.id === this.authenticationInfo?.sessionId)) { |
458 | 456 | this.clearAuthenticationPreference();
|
459 | 457 | }
|
460 | 458 | }
|
|
0 commit comments