<commit_before>package pe.com.johnson.pablo.limago.ui.district;

import io.realm.RealmChangeListener;
import io.realm.RealmResults;
import pe.com.johnson.pablo.limago.ui.common.LimaGoPresenter;
import pe.com.johnson.pablo.limago.utils.RealmClient;

/**
 * Created by Pablo on 31/08/16.
 */
public class DistrictPresenter extends LimaGoPresenter<DistrictView> {

    protected DistrictPresenter(DistrictView view) {
        super(view);
    }


    public void retrieveDistricts() {
        RealmResults<District> districts = RealmClient.getRealmClient().where(District.class).findAllAsync();
        //view.updateDistricts(districts);

        districts.addChangeListener(new RealmChangeListener<RealmResults<District>>() {
            @Override
            public void onChange(RealmResults<District> districts) {
                view.updateDistricts(districts);
            }
        });


    }
}<commit_msg>sync query<commit_after>package pe.com.johnson.pablo.limago.ui.district;

import io.realm.RealmResults;
import pe.com.johnson.pablo.limago.ui.common.LimaGoPresenter;
import pe.com.johnson.pablo.limago.utils.RealmClient;

/**
 * Created by Pablo on 31/08/16.
 */
public class DistrictPresenter extends LimaGoPresenter<DistrictView> {

    protected DistrictPresenter(DistrictView view) {
        super(view);
    }


    public void retrieveDistricts() {
        RealmResults<District> districts = RealmClient.getRealmClient().where(District.class).findAll();
        view.updateDistricts(districts);
        /*
        districts.addChangeListener(new RealmChangeListener<RealmResults<District>>() {
            @Override
            public void onChange(RealmResults<District> districts) {
                view.updateDistricts(districts);
            }
        });
        */

    }
}
{'fraction_non_alphanumeric': 0.10863509749303621, 'fraction_numerical': 0.006685236768802228, 'mean_word_length': 3.196261682242991, 'pattern_counts': {'":': 0, '<': 13, '<?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': '6892517', 'n_tokens_mistral': 574, 'n_tokens_neox': 524, 'n_words': 77}