mirror of
https://github.com/mihonapp/mihon.git
synced 2025-10-28 12:57:57 +01:00
Fix crashes introduced yesterday
This commit is contained in:
@@ -37,8 +37,8 @@ class AutofitRecyclerView @JvmOverloads constructor(context: Context, attrs: Att
|
||||
override fun onMeasure(widthSpec: Int, heightSpec: Int) {
|
||||
super.onMeasure(widthSpec, heightSpec)
|
||||
if (spanCount == 0 && columnWidth > 0) {
|
||||
val spanCount = Math.max(1, measuredWidth / columnWidth)
|
||||
manager.spanCount = spanCount
|
||||
val count = Math.max(1, measuredWidth / columnWidth)
|
||||
spanCount = count
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user