1
0
mirror of https://github.com/ultrasonic/ultrasonic synced 2025-02-16 19:50:35 +01:00

Really fixed getSectionName

This commit is contained in:
Nite 2020-11-28 13:51:51 +01:00
parent 7068477e23
commit d98360d3fe
No known key found for this signature in database
GPG Key ID: 1D1AD59B1C6386C1

View File

@ -143,7 +143,13 @@ class ArtistRowAdapter(
}
override fun getSectionName(position: Int): String {
return getSectionFromName(artistList[position].name ?: " ")
var listPosition = if (shouldShowHeader) position - 1 else position
// Show the first artist's initial in the popup when the list is
// scrolled up to the "Select Folder" row
if (listPosition < 0) listPosition = 0
return getSectionFromName(artistList[listPosition].name ?: " ")
}
private fun getSectionForArtist(artistPosition: Int): String {