Last active
May 31, 2021 08:05
-
-
Save adityawid/fe72562dcf112f9a7db32a6d34b50e03 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
interface MovieRepository { | |
fun getPagingFavoriteMovieLiveData(): LiveData<PagingData<Movie>> | |
fun getPagingFavoriteMovieFlow(): Flow<PagingData<Movie>> | |
} | |
class MovieRepositoryImpl ( | |
private val movieLocalDataSource: MovieLocalDataSource | |
) : MovieRepository { | |
override fun getPagingFavoriteMovieLiveData(): LiveData<PagingData<Movie>> = | |
movieLocalDataSource.getFavMoviesasLiveData() | |
override fun getPagingFavoriteMovieFlow(): Flow<PagingData<Movie>> = | |
movieLocalDataSource.getFavMoviesasFlow() | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment