From 183f28b382e31877b89f0c67d4fbea8c166a9a61 Mon Sep 17 00:00:00 2001 From: Jay Date: Fri, 8 May 2020 15:23:29 -0400 Subject: [PATCH] Fast scroller on library now starts below the toolbar Also adjust how far the hopper goes down to hide (so the snackbar has some elevation when it shows) --- .../eu/kanade/tachiyomi/ui/library/LibraryController.kt | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryController.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryController.kt index a6136856ed..87e629cae8 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryController.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryController.kt @@ -184,7 +184,7 @@ class LibraryController( if (!recycler_cover.isClickable && isAnimatingHopper != true) { category_hopper_frame.translationY += dy category_hopper_frame.translationY = - category_hopper_frame.translationY.coerceIn(0f, 60f.dpToPx) + category_hopper_frame.translationY.coerceIn(0f, 50f.dpToPx) up_category.alpha = if (isAtTop()) 0.25f else 1f down_category.alpha = if (isAtBottom()) 0.25f else 1f } @@ -218,7 +218,7 @@ class LibraryController( ) ?: 0 if (!recycler_cover.isClickable) { category_hopper_frame.animate().translationY( - if (category_hopper_frame.translationY > 30f.dpToPx) 60f.dpToPx + if (category_hopper_frame.translationY > 25f.dpToPx) 50f.dpToPx else 0f ).setDuration(shortAnimationDuration.toLong()).start() } @@ -366,6 +366,9 @@ class LibraryController( category_layout?.updateLayoutParams { topMargin = recycler?.paddingTop ?: 0 } + fast_scroller?.updateLayoutParams { + topMargin = recycler?.paddingTop ?: 0 + } }) swipe_refresh.setOnRefreshListener {