Minor cleanup

This commit is contained in:
arkon
2023-04-22 22:29:17 -04:00
parent d62d94f587
commit 67b4e53a58
9 changed files with 14 additions and 14 deletions

View File

@@ -57,10 +57,9 @@ class MaterialSpinnerView @JvmOverloads constructor(context: Context, attrs: Att
val title = getString(R.styleable.MaterialSpinnerView_title).orEmpty()
binding.title.text = title
val viewEntries = (
getTextArray(R.styleable.MaterialSpinnerView_android_entries)
?: emptyArray()
).map { it.toString() }
val viewEntries = getTextArray(R.styleable.MaterialSpinnerView_android_entries)
.orEmpty()
.map { it.toString() }
entries = viewEntries
binding.details.text = viewEntries.firstOrNull().orEmpty()
}