@@ -149,25 +149,6 @@ export class StorageService implements IStorageService {
149149 return value ;
150150 }
151151
152- public remove ( key : string , scope = StorageScope . GLOBAL ) : void {
153- const storage = ( scope === StorageScope . GLOBAL ) ? this . _globalStorage : this . _workspaceStorage ;
154- const storageKey = this . toStorageKey ( key , scope ) ;
155-
156- // Remove
157- storage . removeItem ( storageKey ) ;
158- }
159-
160- public swap ( key : string , valueA : any , valueB : any , scope = StorageScope . GLOBAL , defaultValue ?: any ) : void {
161- const value = this . get ( key , scope ) ;
162- if ( types . isUndefinedOrNull ( value ) && defaultValue ) {
163- this . store ( key , defaultValue , scope ) ;
164- } else if ( value === valueA . toString ( ) ) { // Convert to string because store is string based
165- this . store ( key , valueB , scope ) ;
166- } else {
167- this . store ( key , valueA , scope ) ;
168- }
169- }
170-
171152 public getInteger ( key : string , scope = StorageScope . GLOBAL , defaultValue ?: number ) : number {
172153 const value = this . get ( key , scope , defaultValue ) ;
173154
@@ -192,6 +173,14 @@ export class StorageService implements IStorageService {
192173 return value ? true : false ;
193174 }
194175
176+ public remove ( key : string , scope = StorageScope . GLOBAL ) : void {
177+ const storage = ( scope === StorageScope . GLOBAL ) ? this . _globalStorage : this . _workspaceStorage ;
178+ const storageKey = this . toStorageKey ( key , scope ) ;
179+
180+ // Remove
181+ storage . removeItem ( storageKey ) ;
182+ }
183+
195184 private toStorageKey ( key : string , scope : StorageScope ) : string {
196185 if ( scope === StorageScope . GLOBAL ) {
197186 return StorageService . GLOBAL_PREFIX + key . toLowerCase ( ) ;
0 commit comments