Skip to content

Instantly share code, notes, and snippets.

@adityawid
Created May 21, 2021 06:23
Show Gist options
  • Save adityawid/795de16209f892b04f07e574c97a592c to your computer and use it in GitHub Desktop.
Save adityawid/795de16209f892b04f07e574c97a592c to your computer and use it in GitHub Desktop.
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