Using host variable to make the code nicer

This commit is contained in:
Maxime NATUREL 2022-10-25 17:25:12 +02:00
parent 3e1c110343
commit db17d02f36

View File

@ -72,9 +72,9 @@ class OtherSessionsController @Inject constructor(
sessionDescription(description) sessionDescription(description)
sessionDescriptionDrawable(descriptionDrawable) sessionDescriptionDrawable(descriptionDrawable)
sessionDescriptionColor(descriptionColor) sessionDescriptionColor(descriptionColor)
stringProvider(this@OtherSessionsController.stringProvider) stringProvider(host.stringProvider)
colorProvider(this@OtherSessionsController.colorProvider) colorProvider(host.colorProvider)
drawableProvider(this@OtherSessionsController.drawableProvider) drawableProvider(host.drawableProvider)
selected(device.isSelected) selected(device.isSelected)
clickListener { device.deviceInfo.deviceId?.let { host.callback?.onItemClicked(it) } } clickListener { device.deviceInfo.deviceId?.let { host.callback?.onItemClicked(it) } }
onLongClickListener(View.OnLongClickListener { onLongClickListener(View.OnLongClickListener {