ActivityPub-federated video streaming platform using P2P directly in your web browser
Add action hook, comments loaded (#2539)
Chocobozzz0840ca76a2de
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.tsindex a87bc16d73..910a1761c9 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@@ -130,6 +130,7 @@ export class VideoCommentsComponent implements OnInit, OnChanges, OnDestroy {this.componentPagination.totalItems = res.totalthis.onDataSubject.next(res.data)+ this.hooks.runAction('action:video-watch.video-threads.loaded', 'video-watch', { data: this.componentPagination })},err => this.notifier.error(err.message)diff --git a/shared/models/plugins/client-hook.model.ts b/shared/models/plugins/client-hook.model.tsindex ecbe8bd3c8..fc36e5771c 100644--- a/shared/models/plugins/client-hook.model.ts+++ b/shared/models/plugins/client-hook.model.ts@@ -65,6 +65,8 @@ export const clientActionHookObject = {'action:video-watch.video.loaded': true,// Fired when the player finished loading'action:video-watch.player.loaded': true,+ // Fired when the video watch page comments(threads) are loaded and load more comments on scroll+ 'action:video-watch.video-threads.loaded': true,// Fired when the search page is being initialized'action:search.init': true,