Skip to content

Commit

Permalink
Fix: Kotlin compiler error: inferred type Context? (#2096)
Browse files Browse the repository at this point in the history
This PR will fix android compile error Type mismatch: inferred type is Context? but Context was expected
  • Loading branch information
muhamad-rizki committed Jun 15, 2022
1 parent 593573f commit 8d70e87
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -54,7 +54,7 @@ class PanGestureHandler(context: Context?) : GestureHandler<PanGestureHandler>()
* position of all the fingers will remain still while doing a rotation gesture.
*/
init {
val vc = ViewConfiguration.get(context)
val vc = ViewConfiguration.get(context!!)
val touchSlop = vc.scaledTouchSlop
defaultMinDistSq = (touchSlop * touchSlop).toFloat()
minDistSq = defaultMinDistSq
Expand Down

0 comments on commit 8d70e87

Please sign in to comment.