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 ccafb1433f4161e27b7408346e27a66603a9e87d..0a237fa2b1d47be27e550ae3d4ceb3f344536651 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 e060ab56c5abc3fead0b02e65fb0451c3a2b6ba3..db96b5deb7bea20a076c5275c5d6fd896893c2c3 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" @@ -225,7 +225,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"> @@ -233,7 +233,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">