77import { ExtensionContext } from 'vscode' ;
88import { constants } from './constants' ;
99import { LocalStorageService , StorageLocations } from './localStorageService' ;
10+ import { Logger } from './logger' ;
1011import { Version } from './version' ;
1112
1213export interface IState extends Record < string , unknown > {
@@ -24,6 +25,7 @@ export class StateControl {
2425 private _storageManager : LocalStorageService ;
2526
2627 constructor ( context : ExtensionContext ) {
28+ Logger . log ( 'Starting Local Storage Service...' ) ;
2729 this . _storageManager = new LocalStorageService ( context ) ;
2830 this . _state = this . getState ( ) ;
2931 }
@@ -36,7 +38,7 @@ export class StateControl {
3638 await this . _storageManager . deleteValue ( constants . configId , StorageLocations . Global ) ;
3739 }
3840
39- private async writeState ( ) : Promise < void > {
41+ private async _writeState ( ) : Promise < void > {
4042 await this . _storageManager . setValue < IState > ( constants . configId , this . _state , StorageLocations . Global ) ;
4143 }
4244
@@ -55,6 +57,6 @@ export class StateControl {
5557 this . _state . previousVersion = this . _state . version ;
5658 this . _state . version = newVer . getVersionAsString ( ) ;
5759
58- await this . writeState ( ) ;
60+ await this . _writeState ( ) ;
5961 }
6062}
0 commit comments