Add function in interface to get list of genres

This commit is contained in:
arkon
2020-04-18 11:36:05 -04:00
parent 5cff247aa4
commit 42a97f8c40
3 changed files with 13 additions and 12 deletions
@@ -245,16 +245,14 @@ class MangaInfoController : NucleusController<MangaInfoPresenter>(),
if (!manga.genre.isNullOrBlank()) {
binding.mangaGenresTags.removeAllViews()
manga.genre?.split(", ").orEmpty()
.map { it.trim() }
.forEach { genre ->
val chip = Chip(view.context).apply {
text = genre
setOnClickListener { performSearch(genre) }
}
binding.mangaGenresTags.addView(chip)
manga.getGenres()?.forEach { genre ->
val chip = Chip(view.context).apply {
text = genre
setOnClickListener { performSearch(genre) }
}
binding.mangaGenresTags.addView(chip)
}
}
// Update description TextView.