Commit a765cdb7 authored by Valere's avatar Valere

Remove unneeded runOnUiThread

parent 8ca07df9
...@@ -40,14 +40,12 @@ object WebviewPermissionUtils { ...@@ -40,14 +40,12 @@ object WebviewPermissionUtils {
allowedPermissions[which] = allowedPermissions[which].first to isChecked allowedPermissions[which] = allowedPermissions[which].first to isChecked
} }
.setPositiveButton(R.string.room_widget_resource_grant_permission) { dialog, wich -> .setPositiveButton(R.string.room_widget_resource_grant_permission) { dialog, wich ->
activity.runOnUiThread { request.grant(allowedPermissions.mapNotNull { perm ->
request.grant(allowedPermissions.mapNotNull { perm -> perm.first.takeIf { perm.second }
perm.first.takeIf { perm.second } }.toTypedArray())
}.toTypedArray())
}
} }
.setNegativeButton(R.string.room_widget_resource_decline_permission) { dialog, wich -> .setNegativeButton(R.string.room_widget_resource_decline_permission) { dialog, wich ->
activity.runOnUiThread { request.deny() } request.deny()
} }
.show() .show()
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment