Fix service dependency startup warning (#14180)

* Fix service dependency startup warning

* fix tests
This commit is contained in:
Charles Gagnon
2021-02-06 15:01:16 -08:00
committed by GitHub
parent 63f9be6b5f
commit 86aa24e198
13 changed files with 84 additions and 58 deletions

View File

@@ -50,7 +50,6 @@ export class AccountManagementService implements IAccountManagementService {
// CONSTRUCTOR /////////////////////////////////////////////////////////
constructor(
private _mementoObj: object,
@IInstantiationService private _instantiationService: IInstantiationService,
@IStorageService private _storageService: IStorageService,
@IClipboardService private _clipboardService: IClipboardService,
@@ -58,12 +57,9 @@ export class AccountManagementService implements IAccountManagementService {
@ILogService private readonly _logService: ILogService,
@INotificationService private readonly _notificationService: INotificationService
) {
// Create the account store
if (!this._mementoObj) {
this._mementoContext = new Memento(AccountManagementService.ACCOUNT_MEMENTO, this._storageService);
this._mementoObj = this._mementoContext.getMemento(StorageScope.GLOBAL);
}
this._accountStore = this._instantiationService.createInstance(AccountStore, this._mementoObj);
this._mementoContext = new Memento(AccountManagementService.ACCOUNT_MEMENTO, this._storageService);
const mementoObj = this._mementoContext.getMemento(StorageScope.GLOBAL);
this._accountStore = this._instantiationService.createInstance(AccountStore, mementoObj);
// Setup the event emitters
this._addAccountProviderEmitter = new Emitter<AccountProviderAddedEventParams>();