Fix crash in Controller extensions

This commit is contained in:
Jays2Kings 2021-04-10 03:07:17 -04:00
parent 6b8e4eeb14
commit e0c77abe1c

View File

@ -118,7 +118,7 @@ fun Controller.scrollViewWith(
val attrsArray = intArrayOf(R.attr.actionBarSize)
val array = recycler.context.obtainStyledAttributes(attrsArray)
var appBarHeight = (
if (activityBinding!!.toolbar.height > 0) activityBinding!!.toolbar.height
if (activityBinding?.toolbar?.height ?: 0 > 0) activityBinding!!.toolbar.height
else array.getDimensionPixelSize(0, 0)
) + if (includeTabView) tabBarHeight else 0
array.recycle()