package com.hd.live.wall.wallpapers.viewmode;

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.hd.live.wall.wallpapers.dbData.WallData;
import com.hd.live.wall.wallpapers.pages.PageSourceMain;


public class VmMain extends ViewModel {

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

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

}
