<commit_before>import React from 'react';
import { StyleSheet, View } from 'react-native';
import { connect } from 'react-redux';

import boundActions from '../boundActions';
import { Label, Screen, ZulipSwitch } from '../common';
import LanguagePicker from './LanguagePicker';

const styles = StyleSheet.create({
  optionWrapper: {
    flex: 1,
  },
  optionRow: {
    flexDirection: 'row',
    justifyContent: 'space-between',
    alignItems: 'center',
    padding: 8,
  },
  optionTitle: {
    padding: 8,
    fontWeight: 'bold',
  },
  optionList: {
    flex: 1,
  }
});

class SettingsScreen extends React.Component {

  props: {
    keyboardAvoiding: boolean,
    title: string,
    isSearchBarApplied: boolean,
    searchBar: boolean,
    searchBarOnChange: () => {}
  };

  state: {
    filter: string,
  };

  handleLocaleChange = (value) => {
    this.props.settingsChange('locale', value);
  };

  handleThemeChange = () => {};

  render() {
    const { locale, theme } = this.props;

    return (
      <Screen title="Settings">
        <View style={styles.optionWrapper}>
          <View style={styles.optionRow}>
            <Label text="Night mode" />
            <ZulipSwitch
              defaultValue={theme === 'default'}
              onValueChange={this.handleThemeChange}
            />
          </View>
          <View style={styles.optionList}>
            <Label style={styles.optionTitle} text="Language" />
            <LanguagePicker
              value={locale}
              onValueChange={this.handleLocaleChange}
            />
          </View>
        </View>
      </Screen>
    );
  }
}

export default connect(<commit_msg>Remove non-working night mode option<commit_after>import React from 'react';
import { StyleSheet, View } from 'react-native';
import { connect } from 'react-redux';

import boundActions from '../boundActions';
import { Label, Screen, ZulipSwitch } from '../common';
import LanguagePicker from './LanguagePicker';

const styles = StyleSheet.create({
  optionWrapper: {
    flex: 1,
  },
/*  optionRow: {
    flexDirection: 'row',
    justifyContent: 'space-between',
    alignItems: 'center',
    padding: 8,
  }, */
  optionTitle: {
    padding: 8,
    fontWeight: 'bold',
  },
  optionList: {
    flex: 1,
  }
});

class SettingsScreen extends React.Component {

  props: {
    keyboardAvoiding: boolean,
    title: string,
    isSearchBarApplied: boolean,
    searchBar: boolean,
    searchBarOnChange: () => {}
  };

  state: {
    filter: string,
  };

  handleLocaleChange = (value) => {
    this.props.settingsChange('locale', value);
  };

  handleThemeChange = () => {};

  render() {
    const { locale, theme } = this.props;

    return (
      <Screen title="Settings">
        <View style={styles.optionWrapper}>
          {/* <View style={styles.optionRow}>
            <Label text="Night mode" />
            <ZulipSwitch
              defaultValue={theme === 'default'}
              onValueChange={this.handleThemeChange}
            />
          </View>*/ }
          <View style={styles.optionList}>
            <Label style={styles.optionTitle} text="Language" />
            <LanguagePicker
              value={locale}
              onValueChange={this.handleLocaleChange}
            />
          </View>
        </View>
      </Screen>
    );
  }
}

export default connect(
{'fraction_non_alphanumeric': 0.1397497020262217, 'fraction_numerical': 0.0023837902264600714, 'mean_word_length': 2.3671013039117352, 'pattern_counts': {'":': 0, '<': 27, '<?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': '4015892', 'n_tokens_mistral': 979, 'n_tokens_neox': 957, 'n_words': 215}