<commit_before>/**
 * Created by BK on 19/06/16.
 *
 * @flow
 */

'use strict';

import React from 'react';
import {
    TabBarIOS,
    Navigator
} from 'react-native';
import Icon from 'react-native-vector-icons/Ionicons';
import Colors from '../common/Colors';
import type {Tab} from './../reducers/navigation';
import NotificationsListView from './notifications/NotificationsListView';
import TaskListContainer from './tasks/TaskListContainer';
import ProfileView from './profile/ProfileView';
import TeamView from './team/TeamView';

const ICONSIZE = 30;

type State = {
    selectedTab: string
};

type Props = {
    navigator: Navigator
}

export default class TabsView extends React.Component {
    state: State;
    props: Props;

    constructor() {
        super();
        this.state = {
            selectedTab: 'home'
        };
    }

    onTabSelect(tab: Tab): void {
        if (this.state.selectedTab !== tab) {
            this.setState({
                selectedTab: tab
            });
        }
    }

    render() {
        return (
            <TabBarIOS
                unselectedTintColor={Colors.unselectedGrey}
                tintColor={Colors.tintColor}
                barTintColor={Colors.darkBackground}
            >
                <Icon.TabBarItemIOS
                    title="Tasks"
                    selected={this.state.selectedTab === 'tasks'}
                    onPress={this.onTabSelect.bind(this, 'tasks')}
                    iconName="ios-checkmark-circle-outline"
                    selectedIconName="ios-checkmark-circle"
                    iconSize={ICONSIZE}
                >
                    <TaskListContainer navigator={this.props.navigator} />
                </Icon.TabBarItemIOS>

                <Icon.TabBarItemIOS
                    title="Notifications"<commit_msg>Closes #65; onConstruct tab was removed `home` tab<commit_after>/**
 * Created by BK on 19/06/16.
 *
 * @flow
 */

'use strict';

import React from 'react';
import {
    TabBarIOS,
    Navigator
} from 'react-native';
import Icon from 'react-native-vector-icons/Ionicons';
import Colors from '../common/Colors';
import type {Tab} from './../reducers/navigation';
import NotificationsListView from './notifications/NotificationsListView';
import TaskListContainer from './tasks/TaskListContainer';
import ProfileView from './profile/ProfileView';
import TeamView from './team/TeamView';

const ICONSIZE = 30;

type State = {
    selectedTab: string
};

type Props = {
    navigator: Navigator
}

export default class TabsView extends React.Component {
    state: State;
    props: Props;

    constructor() {
        super();
        this.state = {
            selectedTab: 'tasks'
        };
    }

    onTabSelect(tab: Tab): void {
        if (this.state.selectedTab !== tab) {
            this.setState({
                selectedTab: tab
            });
        }
    }

    render() {
        return (
            <TabBarIOS
                unselectedTintColor={Colors.unselectedGrey}
                tintColor={Colors.tintColor}
                barTintColor={Colors.darkBackground}
            >
                <Icon.TabBarItemIOS
                    title="Tasks"
                    selected={this.state.selectedTab === 'tasks'}
                    onPress={this.onTabSelect.bind(this, 'tasks')}
                    iconName="ios-checkmark-circle-outline"
                    selectedIconName="ios-checkmark-circle"
                    iconSize={ICONSIZE}
                >
                    <TaskListContainer navigator={this.props.navigator} />
                </Icon.TabBarItemIOS>

                <Icon.TabBarItemIOS
                    title="Notifications"
{'fraction_non_alphanumeric': 0.11225040474905558, 'fraction_numerical': 0.004856988667026443, 'mean_word_length': 1.8691950464396285, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 11, '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': '3085638', 'n_tokens_mistral': 1053, 'n_tokens_neox': 1003, 'n_words': 210}