<commit_before>'use strict';

import React from "react/addons";
import TransitionGroup from "react-addons-css-transition-group";
import UIActions from "actions/UIActions";
import JoinChannel from 'components/JoinChannel';
import ChannelStore from 'stores/ChannelStore';
import AppStateStore from 'stores/AppStateStore';
import NetworkActions from 'actions/NetworkActions';
import BackgroundAnimation from 'components/BackgroundAnimation';
import Halogen from 'halogen';
import 'styles/ChannelsPanel.scss';
import 'styles/RecentChannels.scss';

class ChannelsPanel extends React.Component {
  constructor(props) {
    super(props);
    this.state = {
      currentChannel: props.currentChannel,
      openChannels: [],
      joiningToChannel: props.joiningToChannel,
      username: props.username,
      requirePassword: props.requirePassword || <PASSWORD>,
      loading: false,
      theme: props.theme,
      appState: AppStateStore.state,
      networkName: props.networkName
    };
  }

  componentWillReceiveProps(nextProps) {
    this.setState({
      currentChannel: nextProps.currentChannel,
      joiningToChannel: nextProps.joiningToChannel,
      requirePassword: nextProps.requirePassword,
      loading: false,
      theme: nextProps.theme,
      networkName: nextProps.networkName
    });
  }<commit_msg>Don't lose loading state in channels panel<commit_after>'use strict';

import React from "react/addons";
import TransitionGroup from "react-addons-css-transition-group";
import UIActions from "actions/UIActions";
import JoinChannel from 'components/JoinChannel';
import ChannelStore from 'stores/ChannelStore';
import AppStateStore from 'stores/AppStateStore';
import NetworkActions from 'actions/NetworkActions';
import BackgroundAnimation from 'components/BackgroundAnimation';
import Halogen from 'halogen';
import 'styles/ChannelsPanel.scss';
import 'styles/RecentChannels.scss';

class ChannelsPanel extends React.Component {
  constructor(props) {
    super(props);
    this.state = {
      currentChannel: props.currentChannel,
      openChannels: [],
      joiningToChannel: props.joiningToChannel,
      username: props.username,
      requirePassword: props.requirePassword || false,
      loading: false,
      theme: props.theme,
      appState: AppStateStore.state,
      networkName: props.networkName
    };
  }

  componentWillReceiveProps(nextProps) {
    this.setState({
      currentChannel: nextProps.currentChannel,
      joiningToChannel: nextProps.joiningToChannel || this.state.joiningToChannel,
      requirePassword: nextProps.requirePassword,
      loading: false,
      theme: nextProps.theme,
      networkName: nextProps.networkName
    });
  }
{'fraction_non_alphanumeric': 0.09320460453026365, 'fraction_numerical': 0.0, 'mean_word_length': 4.442424242424242, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, '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': '5699764', 'n_tokens_mistral': 724, 'n_tokens_neox': 721, 'n_words': 169}