diff options
author | Chocobozzz <me@florianbigard.com> | 2018-02-13 14:11:05 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-02-13 14:20:46 +0100 |
commit | 0cd4344f3cf529b15308fcf3eb7d7eb07726df56 (patch) | |
tree | 276f6e8cfe72d583114d82fd5db981550a395488 /client/src/app/videos/+video-watch/comment | |
parent | 29c6b829446a6fb29dffc6b7b638079ce60f3771 (diff) | |
download | PeerTube-0cd4344f3cf529b15308fcf3eb7d7eb07726df56.tar.gz PeerTube-0cd4344f3cf529b15308fcf3eb7d7eb07726df56.tar.zst PeerTube-0cd4344f3cf529b15308fcf3eb7d7eb07726df56.zip |
Rewrite infinite scroll
Diffstat (limited to 'client/src/app/videos/+video-watch/comment')
-rw-r--r-- | client/src/app/videos/+video-watch/comment/video-comments.component.html | 7 | ||||
-rw-r--r-- | client/src/app/videos/+video-watch/comment/video-comments.component.ts | 7 |
2 files changed, 5 insertions, 9 deletions
diff --git a/client/src/app/videos/+video-watch/comment/video-comments.component.html b/client/src/app/videos/+video-watch/comment/video-comments.component.html index 80b200931..7f2e96e93 100644 --- a/client/src/app/videos/+video-watch/comment/video-comments.component.html +++ b/client/src/app/videos/+video-watch/comment/video-comments.component.html | |||
@@ -15,10 +15,9 @@ | |||
15 | 15 | ||
16 | <div | 16 | <div |
17 | class="comment-threads" | 17 | class="comment-threads" |
18 | infiniteScroll | 18 | myInfiniteScroller |
19 | [infiniteScrollUpDistance]="1.5" | 19 | [autoLoading]="true" |
20 | [infiniteScrollDistance]="0.5" | 20 | (nearOfBottom)="onNearOfBottom()" |
21 | (scrolled)="onNearOfBottom()" | ||
22 | > | 21 | > |
23 | <div *ngFor="let comment of comments"> | 22 | <div *ngFor="let comment of comments"> |
24 | <my-video-comment | 23 | <my-video-comment |
diff --git a/client/src/app/videos/+video-watch/comment/video-comments.component.ts b/client/src/app/videos/+video-watch/comment/video-comments.component.ts index 6025256de..7ca3bafb5 100644 --- a/client/src/app/videos/+video-watch/comment/video-comments.component.ts +++ b/client/src/app/videos/+video-watch/comment/video-comments.component.ts | |||
@@ -160,11 +160,8 @@ export class VideoCommentsComponent implements OnChanges { | |||
160 | this.threadComments = {} | 160 | this.threadComments = {} |
161 | this.threadLoading = {} | 161 | this.threadLoading = {} |
162 | this.inReplyToCommentId = undefined | 162 | this.inReplyToCommentId = undefined |
163 | this.componentPagination = { | 163 | this.componentPagination.currentPage = 1 |
164 | currentPage: 1, | 164 | this.componentPagination.totalItems = null |
165 | itemsPerPage: 10, | ||
166 | totalItems: null | ||
167 | } | ||
168 | 165 | ||
169 | this.loadMoreComments() | 166 | this.loadMoreComments() |
170 | } | 167 | } |