From a5339969c9121f9c741db9b2b930e1a8b7ec6089 Mon Sep 17 00:00:00 2001 From: arkon Date: Wed, 24 Jun 2020 18:07:16 -0400 Subject: [PATCH] Fix about info now showing after initial manga load (closes #3381) --- .../ui/manga/chapter/MangaInfoHeaderAdapter.kt | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/chapter/MangaInfoHeaderAdapter.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/chapter/MangaInfoHeaderAdapter.kt index 62f8f60fd7..2adfe4a026 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/chapter/MangaInfoHeaderAdapter.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/chapter/MangaInfoHeaderAdapter.kt @@ -246,9 +246,9 @@ class MangaInfoHeaderAdapter( } // Manga info section - if (manga.description.isNullOrBlank() && manga.genre.isNullOrBlank()) { - hideMangaInfo() - } else { + val hasInfoContent = !manga.description.isNullOrBlank() || !manga.genre.isNullOrBlank() + showMangaInfo(hasInfoContent) + if (hasInfoContent) { // Update description TextView. binding.mangaSummary.text = if (manga.description.isNullOrBlank()) { view.context.getString(R.string.unknown) @@ -282,11 +282,11 @@ class MangaInfoHeaderAdapter( binding.btnCategories.visibleIf { manga.favorite && controller.presenter.getCategories().isNotEmpty() } } - private fun hideMangaInfo() { - binding.mangaSummaryLabel.gone() - binding.mangaSummary.gone() - binding.mangaGenresTagsWrapper.gone() - binding.mangaInfoToggle.gone() + private fun showMangaInfo(visible: Boolean) { + binding.mangaSummaryLabel.visibleIf { visible } + binding.mangaSummary.visibleIf { visible } + binding.mangaGenresTagsWrapper.visibleIf { visible } + binding.mangaInfoToggle.visibleIf { visible } } private fun toggleMangaInfo(context: Context) {