mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-11-10 01:35:09 +01:00
Fixing tracepot crashes p2
This commit is contained in:
parent
fe41b1515a
commit
4897b721e5
@ -36,7 +36,7 @@ class BrowseSourceItem(
|
|||||||
|
|
||||||
override fun createViewHolder(view: View, adapter: FlexibleAdapter<IFlexible<RecyclerView.ViewHolder>>): BrowseSourceHolder {
|
override fun createViewHolder(view: View, adapter: FlexibleAdapter<IFlexible<RecyclerView.ViewHolder>>): BrowseSourceHolder {
|
||||||
val parent = adapter.recyclerView
|
val parent = adapter.recyclerView
|
||||||
return if (parent is AutofitRecyclerView) {
|
return if (parent is AutofitRecyclerView && !catalogueAsList.getOrDefault()) {
|
||||||
val listType = catalogueListType.getOrDefault()
|
val listType = catalogueListType.getOrDefault()
|
||||||
view.apply {
|
view.apply {
|
||||||
val coverHeight = (parent.itemWidth / 3 * 4f).toInt()
|
val coverHeight = (parent.itemWidth / 3 * 4f).toInt()
|
||||||
|
@ -101,10 +101,10 @@ fun Controller.scrollViewWith(
|
|||||||
} else if (recycler.translationY == 0f) {
|
} else if (recycler.translationY == 0f) {
|
||||||
elevationAnim?.cancel()
|
elevationAnim?.cancel()
|
||||||
elevationAnim = ValueAnimator.ofFloat(
|
elevationAnim = ValueAnimator.ofFloat(
|
||||||
activity!!.appbar.elevation, if (el) 15f else 0f
|
activity?.appbar?.elevation ?: 0f, if (el) 15f else 0f
|
||||||
)
|
)
|
||||||
elevationAnim?.addUpdateListener { valueAnimator ->
|
elevationAnim?.addUpdateListener { valueAnimator ->
|
||||||
activity!!.appbar.elevation = valueAnimator.animatedValue as Float
|
activity?.appbar?.elevation = valueAnimator.animatedValue as Float
|
||||||
}
|
}
|
||||||
elevationAnim?.start()
|
elevationAnim?.start()
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user