mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-18 07:23:03 +00:00
90252: Fix invalidateByHref not emitting
This commit is contained in:
@@ -600,16 +600,13 @@ export abstract class DataService<T extends CacheableObject> implements UpdateDa
|
||||
const done$ = new AsyncSubject<boolean>();
|
||||
|
||||
this.objectCache.getByHref(href).pipe(
|
||||
switchMap((oce: ObjectCacheEntry) => observableFrom(oce.requestUUIDs)),
|
||||
switchMap((oce: ObjectCacheEntry) => observableFrom(oce.requestUUIDs).pipe(
|
||||
mergeMap((requestUUID: string) => this.requestService.setStaleByUUID(requestUUID)),
|
||||
toArray(),
|
||||
map((areRequestsStale: boolean[]) => areRequestsStale.every(Boolean)),
|
||||
distinctUntilChanged(),
|
||||
).subscribe((done: boolean) => {
|
||||
if (done) {
|
||||
)),
|
||||
).subscribe(() => {
|
||||
done$.next(true);
|
||||
done$.complete();
|
||||
}
|
||||
});
|
||||
|
||||
return done$;
|
||||
@@ -667,11 +664,9 @@ export abstract class DataService<T extends CacheableObject> implements UpdateDa
|
||||
return [true];
|
||||
}
|
||||
})
|
||||
).subscribe((invalidated: boolean) => {
|
||||
if (invalidated) {
|
||||
).subscribe(() => {
|
||||
invalidated$.next(true);
|
||||
invalidated$.complete();
|
||||
}
|
||||
});
|
||||
|
||||
return combineLatest([response$, invalidated$]).pipe(
|
||||
|
Reference in New Issue
Block a user