mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-18 07:23:03 +00:00
Merge remote-tracking branch 'remotes/origin/master' into submission
# Conflicts: # src/app/+search-page/search-service/search.service.spec.ts # src/app/app.component.spec.ts # src/app/app.component.ts # src/app/core/auth/auth-response-parsing.service.ts # src/app/core/cache/models/normalized-object-factory.ts # src/app/core/cache/models/normalized-resource-policy.model.ts # src/app/core/core.module.ts # src/app/core/data/base-response-parsing.service.ts # src/app/core/data/config-response-parsing.service.spec.ts # src/app/core/data/config-response-parsing.service.ts # src/app/core/data/dso-response-parsing.service.ts # src/app/core/data/request.models.ts # src/app/core/data/search-response-parsing.service.ts # src/app/core/integration/integration-response-parsing.service.spec.ts # src/app/core/integration/integration-response-parsing.service.ts # src/app/core/shared/item.model.ts # src/app/core/shared/resource-policy.model.ts # src/app/core/shared/resource-type.ts # src/app/shared/shared.module.ts # src/app/thumbnail/thumbnail.component.html
This commit is contained in:
@@ -5,6 +5,7 @@ import { Collection } from './collection.model';
|
||||
import { RemoteData } from '../data/remote-data';
|
||||
import { Bitstream } from './bitstream.model';
|
||||
import { hasValue, isNotEmpty } from '../../shared/empty.util';
|
||||
import { PaginatedList } from '../data/paginated-list';
|
||||
|
||||
export class Item extends DSpaceObject {
|
||||
|
||||
@@ -47,7 +48,7 @@ export class Item extends DSpaceObject {
|
||||
return this.owningCollection;
|
||||
}
|
||||
|
||||
bitstreams: Observable<RemoteData<Bitstream[]>>;
|
||||
bitstreams: Observable<RemoteData<PaginatedList<Bitstream>>>;
|
||||
|
||||
/**
|
||||
* Retrieves the thumbnail of this item
|
||||
@@ -88,8 +89,8 @@ export class Item extends DSpaceObject {
|
||||
*/
|
||||
getBitstreamsByBundleName(bundleName: string): Observable<Bitstream[]> {
|
||||
return this.bitstreams
|
||||
.filter((rd: RemoteData<Bitstream[]>) => !rd.isResponsePending)
|
||||
.map((rd: RemoteData<Bitstream[]>) => rd.payload)
|
||||
.filter((rd: RemoteData<PaginatedList<Bitstream>>) => !rd.isResponsePending)
|
||||
.map((rd: RemoteData<PaginatedList<Bitstream>>) => rd.payload.page)
|
||||
.filter((bitstreams: Bitstream[]) => hasValue(bitstreams))
|
||||
.take(1)
|
||||
.startWith([])
|
||||
|
Reference in New Issue
Block a user