mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-11-09 19:55:11 +01:00
Fix crash with gif covers in manga details + more pading for category headers
This commit is contained in:
parent
c13b6cbe91
commit
19c1192233
@ -87,7 +87,7 @@ class LibraryHeaderItem(private val categoryF: (Int) -> Category, val catId: Int
|
||||
|
||||
fun bind(category: Category) {
|
||||
sectionText.updateLayoutParams<ConstraintLayout.LayoutParams> {
|
||||
topMargin = (if (category.isFirst == true) 2 else 32).dpToPx
|
||||
topMargin = (if (category.isFirst == true) 2 else 44).dpToPx
|
||||
}
|
||||
|
||||
if (category.isFirst == true && category.isLast == true) sectionText.text = ""
|
||||
|
@ -446,7 +446,7 @@ LibraryListController(bundle: Bundle? = null) : LibraryController(bundle),
|
||||
view?.rootWindowInsets?.systemWindowInsetTop ?: 0
|
||||
) ?: 0f).roundToInt() + 30.dpToPx
|
||||
(recycler.layoutManager as LinearLayoutManager).scrollToPositionWithOffset(
|
||||
headerPosition, (if (headerPosition == 0) 0 else (-28).dpToPx) + appbarOffset
|
||||
headerPosition, (if (headerPosition == 0) 0 else (-40).dpToPx) + appbarOffset
|
||||
)
|
||||
|
||||
/*val headerItem = adapter.getItem(headerPosition) as? LibraryHeaderItem
|
||||
|
@ -338,8 +338,8 @@ class MangaDetailsController : BaseController,
|
||||
transition: Transition<in Drawable>?
|
||||
) {
|
||||
coverDrawable = resource
|
||||
Palette.from(
|
||||
(resource as BitmapDrawable).bitmap).generate {
|
||||
val bitmapCover = resource as? BitmapDrawable ?: return
|
||||
Palette.from(bitmapCover.bitmap).generate {
|
||||
if (recycler == null) return@generate
|
||||
val currentNightMode =
|
||||
recycler.resources!!.configuration.uiMode and Configuration.UI_MODE_NIGHT_MASK
|
||||
|
Loading…
Reference in New Issue
Block a user