]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/app/videos/+video-watch/comment/video-comment-add.component.ts
Speedup embed first paint
[github/Chocobozzz/PeerTube.git] / client / src / app / videos / +video-watch / comment / video-comment-add.component.ts
index 8cdd37680b35cf68cad97d6b18efc3e7dc3c63cd..1be96ad9e85b5d96551db98254e21fc01a810271 100644 (file)
@@ -26,6 +26,7 @@ export class VideoCommentAddComponent extends FormReactive implements OnInit {
   @Input() focusOnInit = false
 
   @Output() commentCreated = new EventEmitter<VideoCommentCreate>()
+  @Output() cancel = new EventEmitter()
 
   @ViewChild('visitorModal', { static: true }) visitorModal: NgbModal
   @ViewChild('textarea', { static: true }) textareaElement: ElementRef
@@ -136,6 +137,10 @@ export class VideoCommentAddComponent extends FormReactive implements OnInit {
     this.router.navigate([ '/login' ])
   }
 
+  cancelCommentReply () {
+    this.cancel.emit(null)
+  }
+
   private addCommentReply (commentCreate: VideoCommentCreate) {
     return this.videoCommentService
       .addCommentReply(this.video.id, this.parentComment.id, commentCreate)