package com.yidianling.dynamic.trendsHome;

import android.support.v4.app.Fragment;

import com.yidianling.dynamic.trendList.TrendsListFragment;
import com.yidianling.dynamic.trendsHome.content.TrendsContentListFragment;


/**
 * Created by Jim on 2017/9/22 0022.
 */

public class TrendsHomePresenter {

    ITrendHomeView callBack=null;

    public void fetchDats(){
        Fragment[] fragments=new Fragment[TrendsHomeVpAdapter.dataSize];

        fragments[0]= TrendsContentListFragment.newInstance(2,0, TrendsListFragment.Companion.getTREND_TYPE_DEFAULT(),"0");
        fragments[1]= TrendsContentListFragment.newInstance(1,0, TrendsListFragment.Companion.getTREND_TYPE_DEFAULT(),"0");
        fragments[2]= TrendsContentListFragment.newInstance(3,0, TrendsListFragment.Companion.getTREND_TYPE_DEFAULT(),"0");

//        for (int i = 1; i<= TrendsHomeVpAdapter.dataSize; i++){
//            fragments[i-1]= TrendsContentListFragment.newInstance(i,0,TrendsListFragment.TREND_TYPE_DEFAULT,"0");
//        }

        if(callBack!=null){
            callBack.onFetchedDatas(fragments);
        }
    }

}
