Skip to content

ActivityPub-federated video streaming platform using P2P directly in your web browser

Fix no history message

Chocobozzz3fba4b6bce69
diff --git a/client/src/app/+my-library/my-history/my-history.component.html b/client/src/app/+my-library/my-history/my-history.component.html
index 05e016e554..58b874ebfc 100644
--- a/client/src/app/+my-library/my-history/my-history.component.html
+++ b/client/src/app/+my-library/my-history/my-history.component.html
@@ -16,7 +16,7 @@
</div>
-<div class="no-history" i18n *ngIf="pagination.totalItems === 0">You don't have any video history yet.</div>
+<div class="no-history" i18n *ngIf="hasDoneFirstQuery && videos.length === 0">You don't have any video history yet.</div>
<div myInfiniteScroller (nearOfBottom)="onNearOfBottom()" [autoInit]="true" [dataObservable]="onDataSubject.asObservable()" class="videos">
<div class="video" *ngFor="let video of videos">
diff --git a/client/src/app/core/rest/component-pagination.model.ts b/client/src/app/core/rest/component-pagination.model.ts
index bcb73ed0f4..59d70c1e85 100644
--- a/client/src/app/core/rest/component-pagination.model.ts
+++ b/client/src/app/core/rest/component-pagination.model.ts
@@ -4,7 +4,7 @@ export interface ComponentPagination {
totalItems: number
}
-export type ComponentPaginationLight = Omit<ComponentPagination, 'totalItems'>
+export type ComponentPaginationLight = Omit<ComponentPagination, 'totalItems'> & { totalItems?: number }
export function hasMoreItems (componentPagination: ComponentPagination) {
// No results
diff --git a/client/src/app/shared/shared-video-miniature/videos-selection.component.html b/client/src/app/shared/shared-video-miniature/videos-selection.component.html
index 44aa567b93..5f5593512d 100644
--- a/client/src/app/shared/shared-video-miniature/videos-selection.component.html
+++ b/client/src/app/shared/shared-video-miniature/videos-selection.component.html
@@ -1,4 +1,4 @@
-<div class="no-results" i18n *ngIf="pagination.totalItems === 0">No results.</div>
+<div class="no-results" i18n *ngIf="hasDoneFirstQuery && videos.length === 0">No results.</div>
<div myInfiniteScroller [autoInit]="true" (nearOfBottom)="onNearOfBottom()" [dataObservable]="onDataSubject.asObservable()" class="videos">
<div class="video" *ngFor="let video of videos; let i = index; trackBy: videoById">