<commit_before>import React, { PropTypes, Component } from 'react';
import { IMAGES_ROOT } from '../../constants/Constants';
import selectn from 'selectn'
import ChipList from './../ui/ChipList';
import Image from './../ui/Image';
import LoadingSpinnerCSS from './../ui/LoadingSpinnerCSS';
import ThreadNoResults from './ThreadNoResults';
import OrientationRequiredPopup from './../ui/OrientationRequiredPopup';
import FilterStore from '../../stores/FilterStore';
import translate from '../../i18n/Translate';

@translate('ThreadUsers')
export default class ThreadUsers extends Component {

    static contextTypes = {
        history: PropTypes.object.isRequired
    };

    static propTypes = {
        thread : PropTypes.object.isRequired,
        last   : PropTypes.bool.isRequired,
        userId : PropTypes.number.isRequired,
        profile: PropTypes.object.isRequired,
        isSomethingWorking: PropTypes.bool,
        filters: PropTypes.object.isRequired,
        avKey  : PropTypes.number.isRequired,
        // Injected by @translate:
        strings: PropTypes.object
    };

    constructor(props) {
        super(props);

        this.renderChipList = this.renderChipList.bind(this);
        this.goToThread = this.goToThread.bind(this);
        this.continue = this.continue.bind(this);
    }

    mergeImagesWithThread(thread) {
        const defaultImage = `${IMAGES_ROOT}media/cache/user_avatar_60x60/bundles/qnoowweb/images/user-no-img.jpg`;
        let images = thread.cached.map((item, index) => item.photo ? item.photo.thumbnail.small : defaultImage);

        thread.cached[0] = thread.cached[0] ? thread.cached[0] : [];
        images[0] = thread.cached[0].photo ? thread.cached[0].photo.thumbnail.medium : defaultImage;

        if (images.length == 1 && !thread.cached[0].photo) {
            [1, 2, 3, 4].forEach(index => images[index] = defaultImage);
        }

        images.forEach((item, index) => {
            thread.cached[index] = thread.cached[index] || {};
            thread.cached[index].image = item
        });

        return thread;
    }
<commit_msg>QS-1136: thumbnail.big<commit_after>import React, { PropTypes, Component } from 'react';
import { IMAGES_ROOT } from '../../constants/Constants';
import selectn from 'selectn'
import ChipList from './../ui/ChipList';
import Image from './../ui/Image';
import LoadingSpinnerCSS from './../ui/LoadingSpinnerCSS';
import ThreadNoResults from './ThreadNoResults';
import OrientationRequiredPopup from './../ui/OrientationRequiredPopup';
import FilterStore from '../../stores/FilterStore';
import translate from '../../i18n/Translate';

@translate('ThreadUsers')
export default class ThreadUsers extends Component {

    static contextTypes = {
        history: PropTypes.object.isRequired
    };

    static propTypes = {
        thread : PropTypes.object.isRequired,
        last   : PropTypes.bool.isRequired,
        userId : PropTypes.number.isRequired,
        profile: PropTypes.object.isRequired,
        isSomethingWorking: PropTypes.bool,
        filters: PropTypes.object.isRequired,
        avKey  : PropTypes.number.isRequired,
        // Injected by @translate:
        strings: PropTypes.object
    };

    constructor(props) {
        super(props);

        this.renderChipList = this.renderChipList.bind(this);
        this.goToThread = this.goToThread.bind(this);
        this.continue = this.continue.bind(this);
    }

    mergeImagesWithThread(thread) {

        let images = thread.cached.map((item, index) => item.photo ? item.photo.thumbnail.small : `${IMAGES_ROOT}media/cache/profile_picture/bundles/qnoowweb/images/user-no-img.jpg`);

        thread.cached[0] = thread.cached[0] ? thread.cached[0] : [];
        images[0] = thread.cached[0].photo ? thread.cached[0].photo.thumbnail.big : `${IMAGES_ROOT}media/cache/user_avatar_180x180/bundles/qnoowweb/images/user-no-img.jpg`;

        if (images.length == 1 && !thread.cached[0].photo) {
            [1, 2, 3, 4].forEach(index => images[index] = `${IMAGES_ROOT}media/cache/profile_picture/bundles/qnoowweb/images/user-no-img.jpg`);
        }

        images.forEach((item, index) => {
            thread.cached[index] = thread.cached[index] || {};
            thread.cached[index].image = item
        });

        return thread;
    }

{'fraction_non_alphanumeric': 0.1404363974001857, 'fraction_numerical': 0.009749303621169917, 'mean_word_length': 2.9641214351425944, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, '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': '5924016', 'n_tokens_mistral': 1270, 'n_tokens_neox': 1253, 'n_words': 234}