Skip to content

Commit ec452ae

Browse files
authored
storage - properly update is new only once (microsoft#153913) (microsoft#154368)
1 parent 92d25e3 commit ec452ae

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/vs/workbench/services/storage/browser/storageService.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -114,18 +114,20 @@ export class BrowserStorageService extends AbstractStorageService {
114114

115115
this.profileStorageDatabase = applicationStorageIndexedDB;
116116
this.profileStorage = applicationStorage;
117+
118+
this.profileStorageDisposables.add(this.profileStorage.onDidChangeStorage(key => this.emitDidChangeValue(StorageScope.PROFILE, key)));
117119
} else {
118120
const profileStorageIndexedDB = await IndexedDBStorageDatabase.create({ id: this.getId(StorageScope.PROFILE), broadcastChanges: true }, this.logService);
119121

120122
this.profileStorageDatabase = this.profileStorageDisposables.add(profileStorageIndexedDB);
121123
this.profileStorage = this.profileStorageDisposables.add(new Storage(this.profileStorageDatabase));
122-
}
123124

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)));
125126

126-
await this.profileStorage.init();
127+
await this.profileStorage.init();
127128

128-
this.updateIsNew(this.profileStorage);
129+
this.updateIsNew(this.profileStorage);
130+
}
129131
}
130132

131133
private async createWorkspaceStorage(): Promise<void> {

0 commit comments

Comments
 (0)