- <div *ngIf="comment.totalReplies !== 0 && !threadComments[comment.id]" (click)="viewReplies(comment)" class="view-replies">
- View all {{ comment.totalReplies }} replies
+ <div
+ class="comment-threads"
+ myInfiniteScroller
+ [autoLoading]="true"
+ (nearOfBottom)="onNearOfBottom()"
+ >
+ <div *ngIf="highlightedThread" id="highlighted-comment">
+ <my-video-comment
+ [comment]="highlightedThread"
+ [video]="video"
+ [inReplyToCommentId]="inReplyToCommentId"
+ [commentTree]="threadComments[highlightedThread.id]"
+ [highlightedComment]="true"
+ (wantedToReply)="onWantedToReply($event)"
+ (wantedToDelete)="onWantedToDelete($event)"
+ (threadCreated)="onThreadCreated($event)"
+ (resetReply)="onResetReply()"
+ ></my-video-comment>
+ </div>
+
+ <div *ngFor="let comment of comments">
+ <my-video-comment
+ *ngIf="!highlightedThread || comment.id !== highlightedThread.id"
+ [comment]="comment"
+ [video]="video"
+ [inReplyToCommentId]="inReplyToCommentId"
+ [commentTree]="threadComments[comment.id]"
+ (wantedToReply)="onWantedToReply($event)"
+ (wantedToDelete)="onWantedToDelete($event)"
+ (threadCreated)="onThreadCreated($event)"
+ (resetReply)="onResetReply()"
+ ></my-video-comment>