Fix library searchbar moving up when tapped with collapsed toolbar on

This commit is contained in:
Jays2Kings 2022-05-08 02:30:22 -04:00
parent 750e39389c
commit c27bb0d73f
2 changed files with 1 additions and 4 deletions

View file

@ -88,6 +88,7 @@ class ExpandedAppBarLayout@JvmOverloads constructor(context: Context, attrs: Att
/** A value used to determine the offset needed for a appbar's y to show only the smaller toolbar */
val yNeededForSmallToolbar: Int
get() {
if (toolbarMode != ToolbarState.EXPANDED) return 0
val tabHeight = if (tabsFrameLayout?.isVisible == true) 48.dpToPx else 0
return -preLayoutHeight + (mainToolbar?.height ?: 0) + tabHeight
}

View file

@ -1735,10 +1735,6 @@ class LibraryController(
!singleCategory && presenter.showAllCategories
) {
showCategories(true)
binding.libraryGridRecycler.recycler.post {
activityBinding?.appBar?.y = (activityBinding?.appBar?.yNeededForSmallToolbar ?: 0).toFloat()
activityBinding?.appBar?.updateAppBarAfterY(binding.libraryGridRecycler.recycler)
}
}
}