<commit_before>class ActivityController extends KDObject

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

    super options, data

    @newItemsCount   = 0
    @flags           = {}
    groupsController = KD.getSingleton "groupsController"
    groupChannel     = null

    groupsController.on 'ready', =>
      groupChannel.close().off()  if groupChannel?
      groupChannel = groupsController.groupChannel
      groupChannel.on 'feed-new', (activities) =>
        revivedActivities = (KD.remote.revive activity for activity in activities)
        isOnActivityPage = KD.getSingleton("router").getCurrentPath() is "/Activity"
        ++@newItemsCount  unless isOnActivityPage

    @on "ActivityItemBlockUserClicked",         @bound "openBlockUserModal"
    @on "ActivityItemMarkUserAsTrollClicked",   @bound "markUserAsTroll"
    @on "ActivityItemUnMarkUserAsTrollClicked", @bound "unmarkUserAsTroll"<commit_msg>mainapp: groupcontroller.ready event fix<commit_after>class ActivityController extends KDObject

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

    super options, data

    @newItemsCount   = 0
    @flags           = {}
    groupsController = KD.getSingleton "groupsController"
    groupChannel     = null

    groupsController.ready =>
      groupChannel.close().off()  if groupChannel?
      groupChannel = groupsController.groupChannel
      groupChannel.on 'feed-new', (activities) =>
        revivedActivities = (KD.remote.revive activity for activity in activities)
        isOnActivityPage = KD.getSingleton("router").getCurrentPath() is "/Activity"
        ++@newItemsCount  unless isOnActivityPage

    @on "ActivityItemBlockUserClicked",         @bound "openBlockUserModal"
    @on "ActivityItemMarkUserAsTrollClicked",   @bound "markUserAsTroll"
    @on "ActivityItemUnMarkUserAsTrollClicked", @bound "unmarkUserAsTroll"
{'fraction_non_alphanumeric': 0.09688013136288999, 'fraction_numerical': 0.0010946907498631637, 'mean_word_length': 3.711340206185567, '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': '5756384', 'n_tokens_mistral': 516, 'n_tokens_neox': 497, 'n_words': 109}