Fix a few regressions with the new bottom sheet

This commit is contained in:
Christophe Henry 2023-04-11 13:16:03 +02:00
parent 45773aac8d
commit fbbd90111d
3 changed files with 7 additions and 4 deletions

View File

@ -71,7 +71,6 @@ class FavoritesAdapter(
CoverArt.withContext(layoutInflater.context, maybeNormalizeUrl(track.cover()))
.fit()
.placeholder(R.drawable.cover)
.transform(RoundedCornersTransformation(16, 0))
.into(holder.cover)

View File

@ -73,7 +73,6 @@ class PlaylistTracksAdapter(
CoverArt.withContext(layoutInflater.context, maybeNormalizeUrl(playlistTrack.track.cover()))
.fit()
.placeholder(R.drawable.cover)
.transform(RoundedCornersTransformation(16, 0))
.into(holder.cover)

View File

@ -10,6 +10,9 @@ import audio.funkwhale.ffa.utils.BottomSheetIneractable
import com.google.android.material.bottomsheet.BottomSheetBehavior
import com.google.android.material.card.MaterialCardView
import androidx.core.content.res.use
class NowPlayingBottomSheet @JvmOverloads constructor (
context: Context, attrs: AttributeSet? = null, defStyleAttr: Int = 0
) : MaterialCardView(context, attrs), BottomSheetIneractable {
@ -19,8 +22,10 @@ class NowPlayingBottomSheet @JvmOverloads constructor (
init {
context.theme.obtainStyledAttributes(attrs, R.styleable.NowPlaying, defStyleAttr, 0).use {
targetHeaderId = it.getResourceId(R.styleable.NowPlaying_target_header, NO_ID)
targetHeaderId =context.theme.obtainStyledAttributes(
attrs, R.styleable.NowPlaying, defStyleAttr, 0
).use {
it.getResourceId(R.styleable.NowPlaying_target_header, NO_ID)
}
}