1
0
mirror of https://github.com/ultrasonic/ultrasonic synced 2025-02-16 11:41:16 +01:00

Merge branch 'develop' into gradle-update

This commit is contained in:
tzugen 2022-06-21 09:47:03 +02:00 committed by GitHub
commit e2fa447bbf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -102,8 +102,9 @@ class ArtistRowBinder(
}
private fun getSectionFromName(name: String): String {
var section = name.first().uppercaseChar()
if (!section.isLetter()) section = '#'
if (name.isEmpty()) return SECTION_KEY_DEFAULT
val section = name.first().uppercaseChar()
if (!section.isLetter()) return SECTION_KEY_DEFAULT
return section.toString()
}
@ -123,4 +124,8 @@ class ArtistRowBinder(
override fun onCreateViewHolder(inflater: LayoutInflater, parent: ViewGroup): ViewHolder {
return ViewHolder(inflater.inflate(layout, parent, false))
}
companion object {
const val SECTION_KEY_DEFAULT = "#"
}
}