Code refactor
This commit is contained in:
parent
c050ce3fbd
commit
f7d14e13c7
6 changed files with 25 additions and 18 deletions
|
@ -60,7 +60,7 @@ class SearchAdapter(
|
|||
holder.title?.text = album.title
|
||||
holder.text?.text = album.artistName
|
||||
AlbumGlideRequest.Builder.from(Glide.with(activity), album.safeGetFirstSong())
|
||||
.checkIgnoreMediaStore(activity).build().into(holder.image)
|
||||
.checkIgnoreMediaStore().build().into(holder.image)
|
||||
}
|
||||
ARTIST -> {
|
||||
val artist = dataSet.get(position) as Artist
|
||||
|
|
|
@ -101,11 +101,10 @@ open class AlbumAdapter(
|
|||
}
|
||||
|
||||
AlbumGlideRequest.Builder.from(Glide.with(activity), album.safeGetFirstSong())
|
||||
.checkIgnoreMediaStore(activity)
|
||||
.checkIgnoreMediaStore()
|
||||
.generatePalette(activity)
|
||||
.build()
|
||||
.into(object : RetroMusicColoredTarget(holder.image!!) {
|
||||
|
||||
override fun onColorReady(colors: MediaNotificationProcessor) {
|
||||
setColors(colors, holder)
|
||||
}
|
||||
|
|
|
@ -36,7 +36,7 @@ class HorizontalAlbumAdapter(
|
|||
override fun loadAlbumCover(album: Album, holder: ViewHolder) {
|
||||
if (holder.image == null) return
|
||||
AlbumGlideRequest.Builder.from(Glide.with(activity), album.safeGetFirstSong())
|
||||
.checkIgnoreMediaStore(activity)
|
||||
.checkIgnoreMediaStore()
|
||||
.generatePalette(activity)
|
||||
.build()
|
||||
.into(object : RetroMusicColoredTarget(holder.image!!) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue