<commit_before>// @flow
import React from 'react'
import {Alert} from 'react-native'
import {Section} from 'react-native-tableview-simple'
import Communications from 'react-native-communications'
import DeviceInfo from 'react-native-device-info'
import {version} from '../../../../package.json'
import {PushButtonCell} from '../components/push-button'
import {refreshApp} from '../../../lib/refresh'

export default class SupportSection extends React.Component {
  getDeviceInfo = () => {
    return `
      ----- Please do not edit below here -----
      ${DeviceInfo.getBrand()} ${DeviceInfo.getModel()}
      ${DeviceInfo.getDeviceId()}
      ${DeviceInfo.getSystemName()} ${DeviceInfo.getSystemVersion()}
      ${DeviceInfo.getReadableVersion()}
      Codepush: ${version}
    `
  }

  getSupportBody = () => {
    return '\n' + this.getDeviceInfo()
  }

  openEmail = () => {
    Communications.email(
      ['<EMAIL>'],
      null,
      null,
      'Support: All About Olaf',
      this.getSupportBody(),
    )
  }

  onResetButton = () =>
    Alert.alert(
      'Reset Everything',
      'Are you sure you want to clear everything?',
      [
        {
          text: 'Reset it!',<commit_msg>remove an unneeded function call in Settings>SupportSection<commit_after>// @flow
import React from 'react'
import {Alert} from 'react-native'
import {Section} from 'react-native-tableview-simple'
import Communications from 'react-native-communications'
import DeviceInfo from 'react-native-device-info'
import {version} from '../../../../package.json'
import {PushButtonCell} from '../components/push-button'
import {refreshApp} from '../../../lib/refresh'

export default class SupportSection extends React.Component {
  getDeviceInfo = () => `

      ----- Please do not edit below here -----
      ${DeviceInfo.getBrand()} ${DeviceInfo.getModel()}
      ${DeviceInfo.getDeviceId()}
      ${DeviceInfo.getSystemName()} ${DeviceInfo.getSystemVersion()}
      ${DeviceInfo.getReadableVersion()}
      Codepush: ${version}
    `

  openEmail = () => {
    Communications.email(
      ['<EMAIL>'],
      null,
      null,
      'Support: All About Olaf',
      this.getDeviceInfo(),
    )
  }

  onResetButton = () =>
    Alert.alert(
      'Reset Everything',
      'Are you sure you want to clear everything?',
      [
        {
          text: 'Reset it!',
{'fraction_non_alphanumeric': 0.15648854961832062, 'fraction_numerical': 0.0, 'mean_word_length': 2.8672131147540982, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 13, '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': '4727585', 'n_tokens_mistral': 674, 'n_tokens_neox': 682, 'n_words': 170}