Code refactor
This commit is contained in:
parent
0069253043
commit
a4b1b0a085
4 changed files with 2 additions and 13 deletions
|
@ -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)
|
||||
})
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue