mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-11-20 00:19:16 +01:00
MangaSummaryView: Fix incomplete description on tablet ui (#6518)
This commit is contained in:
parent
7de707c60a
commit
cf5e60f8eb
@ -290,9 +290,9 @@ class MangaInfoHeaderAdapter(
|
|||||||
binding.mangaCover.loadAnyAutoPause(manga)
|
binding.mangaCover.loadAnyAutoPause(manga)
|
||||||
|
|
||||||
// Manga info section
|
// Manga info section
|
||||||
binding.mangaSummarySection.isVisible = !manga.description.isNullOrBlank() || !manga.genre.isNullOrBlank()
|
|
||||||
binding.mangaSummarySection.description = manga.description
|
|
||||||
binding.mangaSummarySection.setTags(manga.getGenres(), controller::performGenreSearch)
|
binding.mangaSummarySection.setTags(manga.getGenres(), controller::performGenreSearch)
|
||||||
|
binding.mangaSummarySection.description = manga.description
|
||||||
|
binding.mangaSummarySection.isVisible = !manga.description.isNullOrBlank() || !manga.genre.isNullOrBlank()
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -59,7 +59,9 @@ class MangaSummaryView @JvmOverloads constructor(
|
|||||||
doOnNextLayout {
|
doOnNextLayout {
|
||||||
updateExpandState()
|
updateExpandState()
|
||||||
}
|
}
|
||||||
requestLayout()
|
if (!isInLayout) {
|
||||||
|
requestLayout()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -141,7 +143,10 @@ class MangaSummaryView @JvmOverloads constructor(
|
|||||||
}
|
}
|
||||||
|
|
||||||
override fun onMeasure(widthMeasureSpec: Int, heightMeasureSpec: Int) {
|
override fun onMeasure(widthMeasureSpec: Int, heightMeasureSpec: Int) {
|
||||||
if (!recalculateHeights) {
|
// Wait until parent view has determined the exact width
|
||||||
|
// because this affect the description line count
|
||||||
|
val measureWidthFreely = MeasureSpec.getMode(widthMeasureSpec) != MeasureSpec.EXACTLY
|
||||||
|
if (!recalculateHeights || measureWidthFreely) {
|
||||||
super.onMeasure(widthMeasureSpec, heightMeasureSpec)
|
super.onMeasure(widthMeasureSpec, heightMeasureSpec)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user