BindingAdapters: use sleeker lambda
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
This commit is contained in:
parent
d44a83faaa
commit
4d4764eefb
@ -136,7 +136,7 @@ object BindingAdapters {
|
|||||||
@JvmStatic
|
@JvmStatic
|
||||||
@BindingAdapter("android:text")
|
@BindingAdapter("android:text")
|
||||||
fun setText(view: TextView, text: Optional<*>) {
|
fun setText(view: TextView, text: Optional<*>) {
|
||||||
view.text = text.map { obj: Any -> obj.toString() }.orElse("")
|
view.text = text.map { it.toString() }.orElse("")
|
||||||
}
|
}
|
||||||
|
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
|
Loading…
Reference in New Issue
Block a user