From f99f525169b68515a6b28fa40fc9832c432dd9a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lukas=20Mau=C3=9F?= <lukas.mauss@gmx.de> Date: Tue, 30 Mar 2021 12:09:56 +0200 Subject: [PATCH] Show correct hint if no questions exist --- .../moderator-comment-list.component.html | 6 +++--- .../shared/comment-list/comment-list.component.html | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/app/components/moderator/moderator-comment-list/moderator-comment-list.component.html b/src/app/components/moderator/moderator-comment-list/moderator-comment-list.component.html index 1fdfd0788..56e059215 100644 --- a/src/app/components/moderator/moderator-comment-list/moderator-comment-list.component.html +++ b/src/app/components/moderator/moderator-comment-list/moderator-comment-list.component.html @@ -1,6 +1,6 @@ <div fxLayout="row" + *ngIf="comments.length > 0" [ngClass]="{'search-container' : !scroll, 'search-container-fixed' : scroll}" - *ngIf="comments.length > 1" (window:scroll)="checkScroll()" fxLayoutAlign="center"> <mat-label *ngIf="deviceType === 'desktop'" @@ -127,7 +127,7 @@ </app-comment> </div> -<div *ngIf="comments && commentsFilteredByTime.length < 1 && period === 'time-all' && !isLoading" +<div *ngIf="comments && (commentsFilteredByTime.length < 1 && period === 'time-all' || comments.length === 0) && !isLoading" fxLayout="row" fxLayoutAlign="center center" class="no-comments"> @@ -136,7 +136,7 @@ </div> <div *ngIf="(filteredComments && filteredComments.length === 0 && hideCommentsList) - || (comments && commentsFilteredByTime.length === 0 && period !== 'time-all') && !isLoading" + || (comments && commentsFilteredByTime.length === 0 && period !== 'time-all') && !isLoading && comments.length > 0" fxLayout="row" fxLayoutAlign="center center" class="no-comments"> diff --git a/src/app/components/shared/comment-list/comment-list.component.html b/src/app/components/shared/comment-list/comment-list.component.html index 6e4ccf70d..82234ec8d 100644 --- a/src/app/components/shared/comment-list/comment-list.component.html +++ b/src/app/components/shared/comment-list/comment-list.component.html @@ -1,6 +1,6 @@ <div fxLayout="row" + *ngIf="comments.length > 0" [ngClass]="{'search-container' : !scroll, 'search-container-fixed' : scroll}" - *ngIf="comments.length > 1" (window:scroll)="checkScroll()" fxLayoutAlign="center"> <button id="filter-close-button" @@ -227,7 +227,7 @@ </div> <!-- No Questions Present --> -<div *ngIf="comments && commentsFilteredByTime.length < 1 && period === 'time-all' && !isLoading" +<div *ngIf="comments && (commentsFilteredByTime.length < 1 && period === 'time-all' || comments.length === 0) && !isLoading" fxLayout="row" fxLayoutAlign="center center" class="no-comments"> @@ -235,7 +235,7 @@ </div> <div *ngIf="(filteredComments && filteredComments.length === 0 && hideCommentsList) - || (comments && commentsFilteredByTime.length === 0 && period !== 'time-all') && !isLoading" + || (comments && commentsFilteredByTime.length === 0 && period !== 'time-all') && !isLoading && comments.length > 0" fxLayout="row" fxLayoutAlign="center center" class="no-comments"> -- GitLab