From 0ca9418cd9607925b9e41bda34c072c1aa602314 Mon Sep 17 00:00:00 2001 From: Jay Date: Thu, 30 Apr 2020 16:44:08 -0400 Subject: [PATCH] Fix jumping on recycler on some views when moving to a new screen --- .../eu/kanade/tachiyomi/util/view/ControllerExtensions.kt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/eu/kanade/tachiyomi/util/view/ControllerExtensions.kt b/app/src/main/java/eu/kanade/tachiyomi/util/view/ControllerExtensions.kt index 2cf954449c..8c22f22fba 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/util/view/ControllerExtensions.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/util/view/ControllerExtensions.kt @@ -18,6 +18,7 @@ import com.bluelinelabs.conductor.ControllerChangeType import com.bluelinelabs.conductor.RouterTransaction import com.bluelinelabs.conductor.changehandler.FadeChangeHandler import eu.kanade.tachiyomi.ui.main.BottomSheetController +import eu.kanade.tachiyomi.ui.manga.MangaDetailsController import eu.kanade.tachiyomi.util.system.dpToPx import kotlinx.android.synthetic.main.main_activity.* import kotlin.math.abs @@ -135,7 +136,9 @@ fun Controller.scrollViewWith( } } } else { - if (!customPadding && lastY == 0f) { + if (!customPadding && lastY == 0f && + router.backstack.lastOrNull()?.controller() is MangaDetailsController + ) { recycler.updatePaddingRelative( top = 0 )