71380: Remove redundant code and add subscribable removeByHrefSubstring

This commit is contained in:
Kristof De Langhe
2020-06-25 17:51:11 +02:00
parent 73c25998e3
commit bfdd943d45
4 changed files with 17 additions and 23 deletions

View File

@@ -198,8 +198,11 @@ export class ItemBitstreamsComponent extends AbstractItemUpdateComponent impleme
this.bundleService.patch(bundle, [moveOperation]).pipe(take(1)).subscribe((response: RestResponse) => {
this.zone.run(() => {
this.displayNotifications('item.edit.bitstreams.notifications.move', [response]);
this.requestService.removeByHrefSubstring(bundle.self);
event.finish();
// Remove all cached requests from this bundle and call the event's callback when the requests are cleared
this.requestService.removeByHrefSubstring(bundle.self).pipe(
filter((isCached) => isCached),
take(1)
).subscribe(() => event.finish());
});
});
}