<commit_before>import {Component} from '@angular/core';
import { App, NavController } from 'ionic-angular';
import {ChatPage} from '../chat/page';
import strings from '../../strings';

/**
 * ChatsPage class is the Chats view controller
 * 
 * @class {ChatsPage}
 */
@Component({
    template: `
        <ion-header>
            <ion-navbar color="white">
                <ion-title>{{ Text.PAGE_CHATS_TITLE }}</ion-title>
            </ion-navbar>
        </ion-header>

        <ion-content padding class="chats">
            <ion-list>
                <ion-item *ngFor="let chat of chats" (click)="onClickChat(chat)">
                    <ion-avatar item-left>
                        <img src="{{chat.avatar}}">
                    </ion-avatar>
                    <h2>{{chat.name}}</h2>
                    <p>{{chat.lastMessage}}</p>
                    <ion-badge color="danger" item-right *ngIf="chat.unread > 0">{{chat.unread}}</ion-badge>
                </ion-item>
            </ion-list>
            
        </ion-content>
        `,
})
export class ChatsPage {

    private nav: NavController;

    public chats: any[] = [
      { name: '<NAME>', avatar: 'http://lorempixel.com/300/200/people/1', lastMessage: 'Yeah, it would be awesome!', unread: 0 },
      { name: '<NAME>', avatar: 'http://lorempixel.com/300/200/people/2', lastMessage: 'Nah, I don\'t think so...', unread: 2 },
      { name: '<NAME>', avatar: 'http://lorempixel.com/300/200/people/3', lastMessage: 'Meet you there', unread: 1 },
      { name: '<NAME>', avatar: 'http://lorempixel.com/300/200/people/4', lastMessage: 'Hello!', unread: 1 },
      { name: '<NAME>', avatar: 'http://lorempixel.com/300/200/people/5', lastMessage: '8 o\'clock?', unread: 0 }
    ];
<commit_msg>Turning chats list into a virtual scroll list<commit_after>import {Component} from '@angular/core';
import { App, NavController } from 'ionic-angular';
import {ChatPage} from '../chat/page';
import strings from '../../strings';

/**
 * ChatsPage class is the Chats view controller
 * 
 * @class {ChatsPage}
 */
@Component({
    template: `
        <ion-header>
            <ion-navbar color="white">
                <ion-title>{{ Text.PAGE_CHATS_TITLE }}</ion-title>
            </ion-navbar>
        </ion-header>

        <ion-content padding class="chats">
            <ion-list [virtualScroll]="chats">
                <ion-item *virtualItem="let chat" (click)="onClickChat(chat)">
                    <ion-avatar item-left>
                        <img src="{{chat.avatar}}">
                    </ion-avatar>
                    <h2>{{chat.name}}</h2>
                    <p>{{chat.lastMessage}}</p>
                    <ion-badge color="danger" item-right *ngIf="chat.unread > 0">{{chat.unread}}</ion-badge>
                </ion-item>
            </ion-list>
            
        </ion-content>
        `,
})
export class ChatsPage {

    private nav: NavController;

    public chats: any[] = [
      { name: '<NAME>', avatar: 'http://lorempixel.com/300/200/people/1', lastMessage: 'Yeah, it would be awesome!', unread: 0 },
      { name: '<NAME>', avatar: 'http://lorempixel.com/300/200/people/2', lastMessage: 'Nah, I don\'t think so...', unread: 2 },
      { name: '<NAME>', avatar: 'http://lorempixel.com/300/200/people/3', lastMessage: 'Meet you there', unread: 1 },
      { name: '<NAME>', avatar: 'http://lorempixel.com/300/200/people/4', lastMessage: 'Hello!', unread: 1 },
      { name: '<NAME>', avatar: 'http://lorempixel.com/300/200/people/5', lastMessage: '8 o\'clock?', unread: 0 }
    ];

{'fraction_non_alphanumeric': 0.18622234668160179, 'fraction_numerical': 0.024642957154858584, 'mean_word_length': 2.1582670203359857, 'pattern_counts': {'":': 0, '<': 55, '<?xml version=': 0, '>': 57, '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': '7522641', 'n_tokens_mistral': 1236, 'n_tokens_neox': 1129, 'n_words': 248}