Skip to content

Commit

Permalink
Twelve: Also use loadThumbnail for bitmaps
Browse files Browse the repository at this point in the history
Change-Id: Ib6f9c3d4d424427de41142d7f76cc816588a33e2
  • Loading branch information
luca020400 committed Nov 16, 2024
1 parent c3975f3 commit d5a310b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,10 @@ class AlbumFragment : Fragment(R.layout.fragment_album) {
placeholder = R.drawable.ic_album
)
} ?: album.thumbnail?.bitmap?.also { bitmap ->
thumbnailImageView.load(bitmap)
thumbnailImageView.loadThumbnail(
bitmap,
placeholder = R.drawable.ic_album
)
} ?: thumbnailImageView.setImageResource(R.drawable.ic_album)

artistNameTextView.text = album.artistName
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,10 @@ class ArtistFragment : Fragment(R.layout.fragment_artist) {
placeholder = R.drawable.ic_person
)
} ?: artist.thumbnail?.bitmap?.also { bitmap ->
thumbnailImageView.load(bitmap)
thumbnailImageView.loadThumbnail(
bitmap,
placeholder = R.drawable.ic_person
)
} ?: thumbnailImageView.setImageResource(R.drawable.ic_person)

albumsAdapter.submitList(artistWorks.albums)
Expand Down

0 comments on commit d5a310b

Please sign in to comment.