<commit_before>KodingFluxStore = require 'app/flux/base/store'
actions         = require '../actions/actiontypes'
toImmutable     = require 'app/util/toImmutable'
immutable       = require 'immutable'

module.exports = class OpenedChannelsStore extends KodingFluxStore

  @getterPath = 'OpenedChannelsStore'


  getInitialState: -> immutable.Map()


  initialize: ->

    @on actions.LOAD_CHANNEL_SUCCESS, (openedChannels, { channelId }) ->
      openedChannels.set channelId, yes

<commit_msg>activity: mark a channel opened once its messages are loaded<commit_after>KodingFluxStore = require 'app/flux/base/store'
actions         = require '../actions/actiontypes'
toImmutable     = require 'app/util/toImmutable'
immutable       = require 'immutable'

module.exports = class OpenedChannelsStore extends KodingFluxStore

  @getterPath = 'OpenedChannelsStore'


  getInitialState: -> immutable.Map()


  initialize: ->

    @on actions.LOAD_MESSAGES_SUCCESS, (openedChannels, { channelId }) ->
      openedChannels.set channelId, yes


{'fraction_non_alphanumeric': 0.09942084942084942, 'fraction_numerical': 0.0, 'mean_word_length': 4.033980582524272, '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': '1887101', 'n_tokens_mistral': 319, 'n_tokens_neox': 304, 'n_words': 67}