Fix crash when adding launcher widget

This commit is contained in:
MM20 2022-02-01 20:30:57 +01:00
parent 8f142085e8
commit 8a3b8284e7
No known key found for this signature in database
GPG Key ID: 0B61A8F2DEAFA389

View File

@ -205,7 +205,7 @@ class WidgetsView @JvmOverloads constructor(
title(R.string.widget_add_widget)
listItems(items = internalWidgets.map { it.label }) { dialog, index, _ ->
val widget = internalWidgets[index]
val view = WidgetView(context)
val view = WidgetView(this@WidgetsView.context)
val params = LayoutParams(
ViewGroup.LayoutParams.MATCH_PARENT,
ViewGroup.LayoutParams.WRAP_CONTENT