<commit_before>/** @jsx React.DOM */

var Conversation = React.createClass({
  renderStatus: function() {
    var isUnread = this.isUnread();
    var isStale = this.isStale();

    if(isUnread || isStale) {
      var classes = React.addons.classSet({
        'status': true,
        'status-unread': !isStale && isUnread,
        'status-urgent': isStale
      });

      return (
        <div className={classes}></div>
      );
    }
  },

  renderActions: function() {
    if(this.props.conversation.archived) {
      return (
        <div className="conversation-actions btn-group pull-right">
          <button className="btn btn-default btn-sm" onClick={this.props.unarchiveHandler}>Move to Inbox</button>
        </div>
      );
    } else {
      return (
        <div className="conversation-actions btn-group pull-right">
          <button className="btn btn-default btn-sm" onClick={this.props.laterHandler}>Later</button>
          <button className="btn btn-default btn-sm" onClick={this.props.archiveHandler}>Archive</button>
        </div>
      );
    }
  },

  renderReply: function() {
    if(this.hasReply()) {
      return (
        <div className="reply">
          <i className="ss-reply"></i>
        </div>
      );
    }
  },

  renderHeader: function() {
    var previewBody = null;

    if(!this.props.conversation.expanded) {
      previewBody = <span className="text-muted" dangerouslySetInnerHTML={{__html: this.preview()}} />;
    }

    return (
      <a href="#" onClick={this.props.toggleHandler}>
        <div className="conversation-header">
          {this.renderStatus()}

          {this.renderActions()}
          <div className="conversation-person">
            <Person person={this.props.conversation.creator_person} />
          </div><commit_msg>Only display conversations that have messages<commit_after>/** @jsx React.DOM */

var Conversation = React.createClass({
  renderStatus: function() {
    var isUnread = this.isUnread();
    var isStale = this.isStale();

    if(isUnread || isStale) {
      var classes = React.addons.classSet({
        'status': true,
        'status-unread': !isStale && isUnread,
        'status-urgent': isStale
      });

      return (
        <div className={classes}></div>
      );
    }
  },

  renderActions: function() {
    if(this.props.conversation.archived) {
      return (
        <div className="conversation-actions btn-group pull-right">
          <button className="btn btn-default btn-sm" onClick={this.props.unarchiveHandler}>Move to Inbox</button>
        </div>
      );
    } else {
      return (
        <div className="conversation-actions btn-group pull-right">
          <button className="btn btn-default btn-sm" onClick={this.props.laterHandler}>Later</button>
          <button className="btn btn-default btn-sm" onClick={this.props.archiveHandler}>Archive</button>
        </div>
      );
    }
  },

  renderReply: function() {
    if(this.hasReply() && !this.props.conversation.expanded) {
      return (
        <div className="reply">
          <i className="ss-reply"></i>
        </div>
      );
    }
  },

  renderHeader: function() {
    var previewBody = null;

    if(!this.props.conversation.expanded) {
      previewBody = <span className="text-muted" dangerouslySetInnerHTML={{__html: this.preview()}} />;
    }

    return (
      <a href="#" onClick={this.props.toggleHandler}>
        <div className="conversation-header">
          {this.renderStatus()}

          {this.renderActions()}
          <div className="conversation-person">
            <Person person={this.props.conversation.creator_person} />
          </div>
{'fraction_non_alphanumeric': 0.1495480690221857, 'fraction_numerical': 0.0, 'mean_word_length': 2.4947368421052634, 'pattern_counts': {'":': 0, '<': 47, '<?xml version=': 0, '>': 47, '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': '5039731', 'n_tokens_mistral': 1095, 'n_tokens_neox': 1084, 'n_words': 195}