storage - rename storage change event

This commit is contained in:
Benjamin Pasero
2020-11-04 15:36:27 +01:00
parent e216a598d3
commit 163bd1dcb3
19 changed files with 77 additions and 77 deletions

View File

@@ -14,7 +14,7 @@ import { flatten, equals } from 'vs/base/common/arrays';
import { getCurrentAuthenticationSessionInfo, IAuthenticationService } from 'vs/workbench/services/authentication/browser/authenticationService';
import { IUserDataSyncAccountService } from 'vs/platform/userDataSync/common/userDataSyncAccount';
import { IQuickInputService, IQuickPickSeparator } from 'vs/platform/quickinput/common/quickInput';
import { IStorageService, IStorageChangeEvent, StorageScope } from 'vs/platform/storage/common/storage';
import { IStorageService, IStorageValueChangeEvent, StorageScope } from 'vs/platform/storage/common/storage';
import { ILogService } from 'vs/platform/log/common/log';
import { IProductService } from 'vs/platform/product/common/productService';
import { IExtensionService } from 'vs/workbench/services/extensions/common/extensions';
@@ -175,7 +175,7 @@ export class UserDataSyncWorkbenchService extends Disposable implements IUserDat
(() => this.update()));
this._register(Event.filter(this.authenticationService.onDidChangeSessions, e => this.isSupportedAuthenticationProviderId(e.providerId))(({ event }) => this.onDidChangeSessions(event)));
this._register(this.storageService.onDidChangeStorage(e => this.onDidChangeStorage(e)));
this._register(this.storageService.onDidChangeValue(e => this.onDidChangeStorage(e)));
this._register(Event.filter(this.userDataSyncAccountService.onTokenFailed, isSuccessive => isSuccessive)(() => this.onDidSuccessiveAuthFailures()));
}
@@ -584,7 +584,7 @@ export class UserDataSyncWorkbenchService extends Disposable implements IUserDat
this.update();
}
private onDidChangeStorage(e: IStorageChangeEvent): void {
private onDidChangeStorage(e: IStorageValueChangeEvent): void {
if (e.key === UserDataSyncWorkbenchService.CACHED_SESSION_STORAGE_KEY && e.scope === StorageScope.GLOBAL
&& this.currentSessionId !== this.getStoredCachedSessionId() /* This checks if current window changed the value or not */) {
this._cachedCurrentSessionId = null;