<commit_before>class ReviewView extends KDView

  constructor:(options, data)->

    super

    @setClass "comment-container"
    @createSubViews data
    @resetDecoration()
    @attachListeners()

  render:->
    @resetDecoration()

  createSubViews:(data)->

    @reviewList = new KDListView
      type          : "comments"
      subItemClass  : CommentListItemView
      delegate      : @
    , data

    @reviewController         = new ReviewListViewController view: @reviewList
    @addSubView showMore      = new CommentViewHeader
      delegate        : @reviewList
      itemTypeString  : 'review'
    , data
    @addSubView @reviewController.getView()
    @addSubView @commentForm  = new NewReviewForm delegate : @reviewList

    @reviewList.on "OwnCommentHasArrived", -> showMore.ownCommentArrived()
    @reviewList.on "ReviewIsDeleted", -> showMore.ownCommentDeleted()

    data.fetchRelativeReviews limit:10, after:'meta.createdAt', (err, reviews)=>
      for review in reviews
        @reviewList.addItem review

    @reviewList.emit "BackgroundActivityFinished"

  attachListeners:->

    @listenTo
      KDEventTypes : "DecorateActiveCommentView"
      listenedToInstance : @reviewList
      callback : @decorateActiveCommentState

    @listenTo
      KDEventTypes : "CommentLinkReceivedClick"
      listenedToInstance : @reviewList
      callback : (pubInst, event) =><commit_msg>Use reviewlistitemview in reviewlist<commit_after>class ReviewView extends KDView

  constructor:(options, data)->

    super

    @setClass "comment-container"
    @createSubViews data
    @resetDecoration()
    @attachListeners()

  render:->
    @resetDecoration()

  createSubViews:(data)->

    @reviewList = new KDListView
      type          : "comments"
      subItemClass  : ReviewListItemView
      delegate      : @
    , data

    @reviewController         = new ReviewListViewController view: @reviewList
    @addSubView showMore      = new CommentViewHeader
      delegate        : @reviewList
      itemTypeString  : 'review'
    , data
    @addSubView @reviewController.getView()
    @addSubView @commentForm  = new NewReviewForm delegate : @reviewList

    @reviewList.on "OwnCommentHasArrived", -> showMore.ownCommentArrived()
    @reviewList.on "ReviewIsDeleted", -> showMore.ownCommentDeleted()

    data.fetchRelativeReviews limit:10, after:'meta.createdAt', (err, reviews)=>
      for review in reviews
        @reviewList.addItem review

    @reviewList.emit "BackgroundActivityFinished"

  attachListeners:->

    @listenTo
      KDEventTypes : "DecorateActiveCommentView"
      listenedToInstance : @reviewList
      callback : @decorateActiveCommentState

    @listenTo
      KDEventTypes : "CommentLinkReceivedClick"
      listenedToInstance : @reviewList
      callback : (pubInst, event) =>
{'fraction_non_alphanumeric': 0.08806818181818182, 'fraction_numerical': 0.0014204545454545455, 'mean_word_length': 3.2044776119402987, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 19, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7388282', 'n_tokens_mistral': 802, 'n_tokens_neox': 771, 'n_words': 167}