Merge branch 'develop' into gradle-update
This commit is contained in:
commit
e2fa447bbf
|
@ -102,8 +102,9 @@ class ArtistRowBinder(
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun getSectionFromName(name: String): String {
|
private fun getSectionFromName(name: String): String {
|
||||||
var section = name.first().uppercaseChar()
|
if (name.isEmpty()) return SECTION_KEY_DEFAULT
|
||||||
if (!section.isLetter()) section = '#'
|
val section = name.first().uppercaseChar()
|
||||||
|
if (!section.isLetter()) return SECTION_KEY_DEFAULT
|
||||||
return section.toString()
|
return section.toString()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -123,4 +124,8 @@ class ArtistRowBinder(
|
||||||
override fun onCreateViewHolder(inflater: LayoutInflater, parent: ViewGroup): ViewHolder {
|
override fun onCreateViewHolder(inflater: LayoutInflater, parent: ViewGroup): ViewHolder {
|
||||||
return ViewHolder(inflater.inflate(layout, parent, false))
|
return ViewHolder(inflater.inflate(layout, parent, false))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
companion object {
|
||||||
|
const val SECTION_KEY_DEFAULT = "#"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue