Skip to content

Commit

Permalink
Fix for thumbnail images in items.
Browse files Browse the repository at this point in the history
  • Loading branch information
mspalti committed Nov 29, 2023
1 parent 474b70b commit c0e4216
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/app/item-page/media-viewer/media-viewer.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@
</ng-container>
</div>
<ng-template #showThumbnail>
<ds-themed-media-viewer-image *ngIf="mediaOptions.image && mediaOptions.video"
<ds-themed-media-viewer-image *ngIf="mediaOptions.image"
[image]="(thumbnailsRD$ | async)?.payload?.page[0]?._links.content.href || thumbnailPlaceholder"
[preview]="false"
></ds-themed-media-viewer-image>
<ds-thumbnail *ngIf="!(mediaOptions.image && mediaOptions.video)"
<ds-thumbnail *ngIf="!(mediaOptions.image)"
[thumbnail]="(thumbnailsRD$ | async)?.payload?.page[0]">
</ds-thumbnail>
</ng-template>
Expand Down
4 changes: 3 additions & 1 deletion src/app/item-page/media-viewer/media-viewer.component.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Component, Input, OnDestroy, OnInit } from '@angular/core';
import { ChangeDetectorRef, Component, Input, OnDestroy, OnInit } from '@angular/core';
import { BehaviorSubject, Observable } from 'rxjs';
import { filter, take } from 'rxjs/operators';
import { BitstreamDataService } from '../../core/data/bitstream-data.service';
Expand Down Expand Up @@ -42,6 +42,7 @@ export class MediaViewerComponent implements OnDestroy, OnInit {

constructor(
protected bitstreamDataService: BitstreamDataService,
protected changeDetectorRef: ChangeDetectorRef
) {
}

Expand Down Expand Up @@ -85,6 +86,7 @@ export class MediaViewerComponent implements OnDestroy, OnInit {
}));
}
this.isLoading = false;
this.changeDetectorRef.detectChanges();
}));
}
}));
Expand Down

0 comments on commit c0e4216

Please sign in to comment.