Created
May 21, 2021 06:23
-
-
Save adityawid/795de16209f892b04f07e574c97a592c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class MovieLocalDataSource( | |
private val movieDao: MovieDao | |
) { | |
fun getFavMoviesasFlow() = Pager( | |
config = PagingConfig( | |
10 | |
) | |
) | |
{ movieDao.getAllFavMovie() } | |
.flow | |
fun getFavMoviesasLiveData() = Pager( | |
config = PagingConfig( | |
10 | |
) | |
) | |
{ movieDao.getAllFavMovie() } | |
.liveData | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment