BindingAdapters: use sleeker lambda

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
This commit is contained in:
Jason A. Donenfeld 2020-03-29 19:44:51 -06:00
parent d44a83faaa
commit 4d4764eefb

View File

@ -136,7 +136,7 @@ object BindingAdapters {
@JvmStatic
@BindingAdapter("android:text")
fun setText(view: TextView, text: Optional<*>) {
view.text = text.map { obj: Any -> obj.toString() }.orElse("")
view.text = text.map { it.toString() }.orElse("")
}
@JvmStatic