Fixing tracepot crashes p2

This commit is contained in:
Jay 2020-05-07 23:06:22 -04:00
parent fe41b1515a
commit 4897b721e5
2 changed files with 3 additions and 3 deletions

View File

@ -36,7 +36,7 @@ class BrowseSourceItem(
override fun createViewHolder(view: View, adapter: FlexibleAdapter<IFlexible<RecyclerView.ViewHolder>>): BrowseSourceHolder {
val parent = adapter.recyclerView
return if (parent is AutofitRecyclerView) {
return if (parent is AutofitRecyclerView && !catalogueAsList.getOrDefault()) {
val listType = catalogueListType.getOrDefault()
view.apply {
val coverHeight = (parent.itemWidth / 3 * 4f).toInt()

View File

@ -101,10 +101,10 @@ fun Controller.scrollViewWith(
} else if (recycler.translationY == 0f) {
elevationAnim?.cancel()
elevationAnim = ValueAnimator.ofFloat(
activity!!.appbar.elevation, if (el) 15f else 0f
activity?.appbar?.elevation ?: 0f, if (el) 15f else 0f
)
elevationAnim?.addUpdateListener { valueAnimator ->
activity!!.appbar.elevation = valueAnimator.animatedValue as Float
activity?.appbar?.elevation = valueAnimator.animatedValue as Float
}
elevationAnim?.start()
}