@@ -23,7 +23,7 @@ export class BrowserStorageService extends AbstractStorageService {
23
23
24
24
private applicationStorage : IStorage | undefined ;
25
25
private applicationStorageDatabase : IIndexedDBStorageDatabase | undefined ;
26
- private readonly applicationStoragePromise = new DeferredPromise < { indededDb : IIndexedDBStorageDatabase ; storage : IStorage } > ( ) ;
26
+ private readonly applicationStoragePromise = new DeferredPromise < { indexedDb : IIndexedDBStorageDatabase ; storage : IStorage } > ( ) ;
27
27
28
28
private profileStorage : IStorage | undefined ;
29
29
private profileStorageDatabase : IIndexedDBStorageDatabase | undefined ;
@@ -92,7 +92,7 @@ export class BrowserStorageService extends AbstractStorageService {
92
92
93
93
this . updateIsNew ( this . applicationStorage ) ;
94
94
95
- this . applicationStoragePromise . complete ( { indededDb : applicationStorageIndexedDB , storage : this . applicationStorage } ) ;
95
+ this . applicationStoragePromise . complete ( { indexedDb : applicationStorageIndexedDB , storage : this . applicationStorage } ) ;
96
96
}
97
97
98
98
private async createProfileStorage ( profile : IUserDataProfile ) : Promise < void > {
@@ -110,22 +110,24 @@ export class BrowserStorageService extends AbstractStorageService {
110
110
// avoid creating the storage library a second time on
111
111
// the same DB.
112
112
113
- const { indededDb : applicationStorageIndexedDB , storage : applicationStorage } = await this . applicationStoragePromise . p ;
113
+ const { indexedDb : applicationStorageIndexedDB , storage : applicationStorage } = await this . applicationStoragePromise . p ;
114
114
115
115
this . profileStorageDatabase = applicationStorageIndexedDB ;
116
116
this . profileStorage = applicationStorage ;
117
+
118
+ this . profileStorageDisposables . add ( this . profileStorage . onDidChangeStorage ( key => this . emitDidChangeValue ( StorageScope . PROFILE , key ) ) ) ;
117
119
} else {
118
120
const profileStorageIndexedDB = await IndexedDBStorageDatabase . create ( { id : this . getId ( StorageScope . PROFILE ) , broadcastChanges : true } , this . logService ) ;
119
121
120
122
this . profileStorageDatabase = this . profileStorageDisposables . add ( profileStorageIndexedDB ) ;
121
123
this . profileStorage = this . profileStorageDisposables . add ( new Storage ( this . profileStorageDatabase ) ) ;
122
- }
123
124
124
- this . profileStorageDisposables . add ( this . profileStorage . onDidChangeStorage ( key => this . emitDidChangeValue ( StorageScope . PROFILE , key ) ) ) ;
125
+ this . profileStorageDisposables . add ( this . profileStorage . onDidChangeStorage ( key => this . emitDidChangeValue ( StorageScope . PROFILE , key ) ) ) ;
125
126
126
- await this . profileStorage . init ( ) ;
127
+ await this . profileStorage . init ( ) ;
127
128
128
- this . updateIsNew ( this . profileStorage ) ;
129
+ this . updateIsNew ( this . profileStorage ) ;
130
+ }
129
131
}
130
132
131
133
private async createWorkspaceStorage ( ) : Promise < void > {
0 commit comments