<commit_before>// @flow
import React from 'react'
import {Cell, Section} from 'react-native-tableview-simple'
import {version} from '../../../../package.json'
import type {TopLevelViewPropsType} from '../../types'
import {setFeedbackStatus} from '../../../flux/parts/settings'
import {connect} from 'react-redux'
import {CellToggle} from '../../components/cell-toggle'

class OddsAndEndsSection extends React.Component {
  props: TopLevelViewPropsType & {
    onChangeFeedbackToggle: (feedbackDisabled: boolean) => any,
    feedbackDisabled: boolean,
  };

  onPressButton = (id: string, title: string) => {
    this.props.navigator.push({
      id: id,
      title: title,
      index: this.props.route.index + 1,
    })
  };

  render() {
    return (
      <Section header="ODDS &amp; ENDS">
        <Cell cellStyle="RightDetail" title="Version" detail={version} />

        <CellToggle
          label="Share Analytics"
          // These are both inverted because the toggle makes more sense as
          // optout/optin, but the code works better as optin/optout.
          value={!this.props.feedbackDisabled}
          onChange={val => this.props.onChangeFeedbackToggle(!val)}
        />

        <PushButtonCell
          title="FAQ"
          onPress={() => this.onPressButton('FaqView', 'FAQs')}
        />

        <PushButtonCell
          title="Credits"
          onPress={() => this.onPressButton('CreditsView', 'Credits')}
        />

        <PushButtonCell
          title="Privacy Policy"
          onPress={() => this.onPressButton('PrivacyView', 'Privacy Policy')}
        />

        <PushButtonCell
          title="Legal"
          onPress={() => this.onPressButton('LegalView', 'Legal')}
        />
      </Section>
    )
  }<commit_msg>shorten OddsAndEndsSection's buttons<commit_after>// @flow
import React from 'react'
import {Cell, Section} from 'react-native-tableview-simple'
import {version} from '../../../../package.json'
import type {TopLevelViewPropsType} from '../../types'
import {setFeedbackStatus} from '../../../flux/parts/settings'
import {connect} from 'react-redux'
import {CellToggle} from '../../components/cell-toggle'

class OddsAndEndsSection extends React.Component {
  props: TopLevelViewPropsType & {
    onChangeFeedbackToggle: (feedbackDisabled: boolean) => any,
    feedbackDisabled: boolean,
  };

  onPressButton = (id: string, title: string) => {
    this.props.navigator.push({
      id: id,
      title: title,
      index: this.props.route.index + 1,
    })
  };

  onFaqButton = () => this.onPressButton('FaqView', 'FAQs');
  onCreditsButton = () => this.onPressButton('CreditsView', 'Credits');
  onPrivacyButton = () => this.onPressButton('PrivacyView', 'Privacy Policy');
  onLegalButton = () => this.onPressButton('LegalView', 'Legal');
  render() {
    return (
      <Section header="ODDS &amp; ENDS">
        <Cell cellStyle="RightDetail" title="Version" detail={version} />

        <CellToggle
          label="Share Analytics"
          // These are both inverted because the toggle makes more sense as
          // optout/optin, but the code works better as optin/optout.
          value={!this.props.feedbackDisabled}
          onChange={val => this.props.onChangeFeedbackToggle(!val)}
        />

        <PushButtonCell title="FAQ" onPress={this.onFaqButton} />
        <PushButtonCell title="Credits" onPress={this.onCreditsButton} />
        <PushButtonCell title="Privacy Policy" onPress={this.onPrivacyButton} />
        <PushButtonCell title="Legal" onPress={this.onLegalButton} />

      </Section>
    )
  }
{'fraction_non_alphanumeric': 0.1489835700362016, 'fraction_numerical': 0.000556947925368978, 'mean_word_length': 2.8748651564185543, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 33, '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': '817901', 'n_tokens_mistral': 1074, 'n_tokens_neox': 1048, 'n_words': 236}