mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-11-19 22:09:16 +01:00
Fix about info now showing after initial manga load (closes #3381)
This commit is contained in:
parent
3645d19135
commit
a5339969c9
@ -246,9 +246,9 @@ class MangaInfoHeaderAdapter(
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Manga info section
|
// Manga info section
|
||||||
if (manga.description.isNullOrBlank() && manga.genre.isNullOrBlank()) {
|
val hasInfoContent = !manga.description.isNullOrBlank() || !manga.genre.isNullOrBlank()
|
||||||
hideMangaInfo()
|
showMangaInfo(hasInfoContent)
|
||||||
} else {
|
if (hasInfoContent) {
|
||||||
// Update description TextView.
|
// Update description TextView.
|
||||||
binding.mangaSummary.text = if (manga.description.isNullOrBlank()) {
|
binding.mangaSummary.text = if (manga.description.isNullOrBlank()) {
|
||||||
view.context.getString(R.string.unknown)
|
view.context.getString(R.string.unknown)
|
||||||
@ -282,11 +282,11 @@ class MangaInfoHeaderAdapter(
|
|||||||
binding.btnCategories.visibleIf { manga.favorite && controller.presenter.getCategories().isNotEmpty() }
|
binding.btnCategories.visibleIf { manga.favorite && controller.presenter.getCategories().isNotEmpty() }
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun hideMangaInfo() {
|
private fun showMangaInfo(visible: Boolean) {
|
||||||
binding.mangaSummaryLabel.gone()
|
binding.mangaSummaryLabel.visibleIf { visible }
|
||||||
binding.mangaSummary.gone()
|
binding.mangaSummary.visibleIf { visible }
|
||||||
binding.mangaGenresTagsWrapper.gone()
|
binding.mangaGenresTagsWrapper.visibleIf { visible }
|
||||||
binding.mangaInfoToggle.gone()
|
binding.mangaInfoToggle.visibleIf { visible }
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun toggleMangaInfo(context: Context) {
|
private fun toggleMangaInfo(context: Context) {
|
||||||
|
Loading…
Reference in New Issue
Block a user