mirror of
https://github.com/recloudstream/cloudstream.git
synced 2024-08-15 01:53:11 +00:00
feat: limit genre tags on home to 2 lines and on result page, 10 tags max (#885)
This commit is contained in:
parent
9733d0b316
commit
601483e103
2 changed files with 3 additions and 1 deletions
|
@ -81,6 +81,7 @@ class HomeScrollAdapter : RecyclerView.Adapter<RecyclerView.ViewHolder>() {
|
|||
binding.homeScrollPreviewTags.apply {
|
||||
text = card.tags?.joinToString(" • ") ?: ""
|
||||
isGone = card.tags.isNullOrEmpty()
|
||||
maxLines = 2
|
||||
}
|
||||
binding.homeScrollPreviewTitle.text = card.name
|
||||
}
|
||||
|
|
|
@ -90,8 +90,9 @@ object UIHelper {
|
|||
if (view == null) return
|
||||
view.removeAllViews()
|
||||
val context = view.context ?: return
|
||||
val maxTags = tags.take(10) // Limited because they are too much
|
||||
|
||||
tags.forEach { tag ->
|
||||
maxTags.forEach { tag ->
|
||||
val chip = Chip(context)
|
||||
val chipDrawable = ChipDrawable.createFromAttributes(
|
||||
context,
|
||||
|
|
Loading…
Reference in a new issue