@igo2/context 20.1.0-next.28 → 20.1.0-next.29

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1284,10 +1284,19 @@ class ContextService {
1284
1284
  const url = this.baseUrl + '/contexts/default';
1285
1285
  return this.http.post(url, { defaultContextId: id });
1286
1286
  }
1287
+ else {
1288
+ return this.setDefaultLocalStorage(id);
1289
+ }
1290
+ }
1291
+ setDefaultLocalStorage(id) {
1292
+ const selectedId = this.storageService.get('favorite.context.uri');
1293
+ if (selectedId === id) {
1294
+ this.storageService.remove('favorite.context.uri');
1295
+ }
1287
1296
  else {
1288
1297
  this.storageService.set('favorite.context.uri', id);
1289
- return of(undefined);
1290
1298
  }
1299
+ return of(selectedId === id ? undefined : id);
1291
1300
  }
1292
1301
  hideContext(id) {
1293
1302
  const url = this.baseUrl + '/contexts/' + id + '/hide';