<commit_before>window.AppView = Backbone.View.extend({
  el: $('#container'),
  
  initialize: function() {
    this.channelCollectionView = new ChannelCollectionView({
      collection: Channels
    }).render();
    
    this.relatedUsersView = new RelatedUsersView();
    
    this.activitiesView = new ActivitiesView();
    
    this.setupChannelReloading();
    
    if ( typeof currentChannel !== "undefined" ) {
      this.changeUser(currentChannel.user);
    } else {
      this.changeUser(currentUser);
    }
  },
  
  // TODO: This function needs to wait for loading (Of channel contents in main column)
  setupChannelReloading: function(){
    var args = arguments;
    setTimeout(function(){
      Channels.fetch({
        success: args.callee
      });
    }, 7000);
  },
  
  openChannel: function(channel) {
    var self = this;
    var oldChannel = currentChannel;
    
    window.currentChannel = channel;
    
    if ( channel ) {
      if ( channel.user.id !== oldChannel.user.id ) {
        this.changeUser(channel.user);
        
        this.channelCollectionView.reload(currentChannel.id);
      }
      
      if ( this.channelView ) {
        this.channelView.close();
      }
      
      this.channelView = new ChannelView({model: channel}).render();
      
      this.relatedUsersView
            .setChannel(channel)
            .render();
      
      this.activitiesView
            .setChannel(channel)
            .render();
    }
    
    return this;<commit_msg>removed unused line<commit_after>window.AppView = Backbone.View.extend({
  el: $('#container'),
  
  initialize: function() {
    this.channelCollectionView = new ChannelCollectionView({
      collection: Channels
    }).render();
    
    this.relatedUsersView = new RelatedUsersView();
    
    this.activitiesView = new ActivitiesView();
    
    this.setupChannelReloading();
    
    if ( typeof currentChannel !== "undefined" ) {
      this.changeUser(currentChannel.user);
    } else {
      this.changeUser(currentUser);
    }
  },
  
  // TODO: This function needs to wait for loading (Of channel contents in main column)
  setupChannelReloading: function(){
    var args = arguments;
    setTimeout(function(){
      Channels.fetch({
        success: args.callee
      });
    }, 7000);
  },
  
  openChannel: function(channel) {
    var oldChannel = currentChannel;
    
    window.currentChannel = channel;
    
    if ( channel ) {
      if ( channel.user.id !== oldChannel.user.id ) {
        this.changeUser(channel.user);
        
        this.channelCollectionView.reload(currentChannel.id);
      }
      
      if ( this.channelView ) {
        this.channelView.close();
      }
      
      this.channelView = new ChannelView({model: channel}).render();
      
      this.relatedUsersView
            .setChannel(channel)
            .render();
      
      this.activitiesView
            .setChannel(channel)
            .render();
    }
    
    return this;
{'fraction_non_alphanumeric': 0.11488075243533759, 'fraction_numerical': 0.0026872690628149142, 'mean_word_length': 2.1987110633727176, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '5627762', 'n_tokens_mistral': 834, 'n_tokens_neox': 827, 'n_words': 162}