<commit_before>class MessagePane extends KDTabPaneView

  constructor: (options = {}, data) ->

    options.type    or= ''
    options.cssClass  = "message-pane #{options.type}"
    options.wrapper     ?= yes
    options.lastToFirst ?= no

    super options, data

    @lastScrollTops =
      window        : 0
      parent        : 0
      self          : 0
      body          : 0

    {itemClass, type, lastToFirst, wrapper} = @getOptions()
    {typeConstant}    = @getData()

    {channelId} = options
    viewOptions = {itemOptions: {channelId}}
    @listController = new ActivityListController { wrapper, itemClass, type: typeConstant, viewOptions, lastToFirst}

    @createInputWidget()

    {socialapi} = KD.singletons
    socialapi.onChannelReady data, @lazyBound 'emit', 'ChannelReady'
    @once 'ChannelReady', @bound 'bindChannelEvents'

    @on 'LazyLoadThresholdReached', @bound 'lazyLoad'  if typeConstant in ['group', 'topic']

    {windowController} = KD.singletons
    windowController.addFocusListener (focused) =>

      @glance()  if focused and @active

    switch typeConstant
      when 'post'
        @listController.getListView().once 'ItemWasAdded', (item) =>
          listView = @listController.getListItems().first.commentBox.controller.getListView()
          listView.on 'ItemWasAdded', @bound 'scrollDown'<commit_msg>PrivateMessage: Fixes "Realtime private messages are received from wrong channel" bug<commit_after>class MessagePane extends KDTabPaneView

  constructor: (options = {}, data) ->

    options.type    or= ''
    options.cssClass  = "message-pane #{options.type}"
    options.wrapper     ?= yes
    options.lastToFirst ?= no

    super options, data

    @lastScrollTops =
      window        : 0
      parent        : 0
      self          : 0
      body          : 0

    {itemClass, type, lastToFirst, wrapper} = @getOptions()
    {typeConstant}    = @getData()

    {channelId} = options
    viewOptions = {itemOptions: {channelId}}
    @listController = new ActivityListController { wrapper, itemClass, type: typeConstant, viewOptions, lastToFirst}

    @createInputWidget()

    {socialapi} = KD.singletons
    @once 'ChannelReady', @bound 'bindChannelEvents'
    socialapi.onChannelReady data, @lazyBound 'emit', 'ChannelReady'

    @on 'LazyLoadThresholdReached', @bound 'lazyLoad'  if typeConstant in ['group', 'topic']

    {windowController} = KD.singletons
    windowController.addFocusListener (focused) =>

      @glance()  if focused and @active

    switch typeConstant
      when 'post'
        @listController.getListView().once 'ItemWasAdded', (item) =>
          listView = @listController.getListItems().first.commentBox.controller.getListView()
          listView.on 'ItemWasAdded', @bound 'scrollDown'
{'fraction_non_alphanumeric': 0.11075036075036075, 'fraction_numerical': 0.002886002886002886, 'mean_word_length': 3.1081481481481483, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, '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': '4661621', 'n_tokens_mistral': 823, 'n_tokens_neox': 776, 'n_words': 193}