package com.free.video.wallpaper.vmhelper;

import androidx.lifecycle.LiveData;
import androidx.lifecycle.ViewModel;
import androidx.paging.Pager;
import androidx.paging.PagingConfig;
import androidx.paging.PagingData;
import androidx.paging.PagingLiveData;

import com.free.video.wallpaper.content.ResultData;
import com.free.video.wallpaper.mypagesource.MainPS;


public class ViewModeMain extends ViewModel {

    public LiveData<PagingData<ResultData>> getPagingData(int wallpaperType) {

        return PagingLiveData.getLiveData(new Pager<>(
                new PagingConfig(10),
                () -> new MainPS(wallpaperType)
        ));
    }

}
