Show manga source in details
This commit is contained in:
@@ -97,6 +97,12 @@ class DetailsFragment : BaseFragment<FragmentDetailsBinding>(), View.OnClickList
|
||||
)
|
||||
}
|
||||
}
|
||||
} ?: chipsTags.addChips(listOf(manga.source)) {
|
||||
create(
|
||||
text = it.title,
|
||||
iconRes = R.drawable.ic_chip_web,
|
||||
tag = it
|
||||
)
|
||||
}
|
||||
imageViewFavourite.setOnClickListener(this@DetailsFragment)
|
||||
buttonRead.setOnClickListener(this@DetailsFragment)
|
||||
|
||||
@@ -47,7 +47,7 @@ var TextView.textAndVisible: CharSequence?
|
||||
isGone = value.isNullOrEmpty()
|
||||
}
|
||||
|
||||
fun <T> ChipGroup.addChips(data: Iterable<T>, action: ChipsFactory.(T) -> Chip) {
|
||||
inline fun <T> ChipGroup.addChips(data: Iterable<T>, action: ChipsFactory.(T) -> Chip) {
|
||||
val factory = ChipsFactory(context)
|
||||
data.forEach {
|
||||
val chip = factory.action(it)
|
||||
|
||||
Reference in New Issue
Block a user