Code refactor

This commit is contained in:
Hemanth S 2020-09-15 23:45:35 +05:30
parent 0069253043
commit a4b1b0a085
4 changed files with 2 additions and 13 deletions

View file

@ -79,7 +79,6 @@ class AlbumDetailsFragment : AbsMainActivityFragment(R.layout.fragment_album_det
toolbar.title = " "
postponeEnterTransition()
detailsViewModel.getAlbum().observe(viewLifecycleOwner, Observer {
println(Thread.currentThread().name)
startPostponedEnterTransition()
showAlbum(it)
})

View file

@ -17,8 +17,7 @@ class AlbumDetailsViewModel(
) : ViewModel(), MusicServiceEventListener {
fun getAlbum(): LiveData<Album> = liveData(IO) {
val album = repository.albumByIdAsync(albumId)
emit(album)
emit(repository.albumByIdAsync(albumId))
}
fun getArtist(artistId: Int): LiveData<Artist> = liveData(IO) {