Action hook: thread replies loaded (#2550)

* Add thread replies hook onLoaded

* Cleaning spaces

* Fixing travis CI lint errors (spaces)

* Fixing travis 'irregular whitespace not allowed'

* Changing action name for consistency

Co-authored-by: ICabaleiro <i.cabaleiro@devcups.com>
pull/2538/head
BitTube 2020-03-11 08:59:41 +00:00 committed by GitHub
parent 9878d1ac63
commit cf387740f2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 0 deletions

View File

@ -96,6 +96,7 @@ export class VideoCommentsComponent implements OnInit, OnChanges, OnDestroy {
res => {
this.threadComments[commentId] = res
this.threadLoading[commentId] = false
this.hooks.runAction('action:video-watch.video-thread-replies.loaded', 'video-watch', { data: res })
if (highlightThread) {
this.highlightedThread = new VideoComment(res.comment)

View File

@ -67,6 +67,8 @@ export const clientActionHookObject = {
'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 a user click on 'View x replies' and they're loaded
'action:video-watch.video-thread-replies.loaded': true,
// Fired when the search page is being initialized
'action:search.init': true,