diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/source/global_search/GlobalSearchController.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/source/global_search/GlobalSearchController.kt index 8d4af2b2fd..3794bbefd0 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/source/global_search/GlobalSearchController.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/source/global_search/GlobalSearchController.kt @@ -193,9 +193,6 @@ open class GlobalSearchController( customTitle = view.context?.getString(R.string.loading) setTitle() } - binding.recycler.post { - binding.recycler.scrollToPosition(0) - } } override fun onDestroyView(view: View) { 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 c1177a8496..834d86b6c2 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 @@ -198,7 +198,7 @@ fun Controller.scrollViewWith( var fakeBottomNavView: View? = null if (!customPadding) { recycler.updatePaddingRelative( - top = activityBinding!!.toolbar.y.toInt() + appBarHeight + top = (toolbarHeight ?: 0) + appBarHeight ) } recycler.doOnApplyWindowInsets { view, insets, _ ->