Sort album view by track position.

This commit is contained in:
Antoine POPINEAU 2019-11-22 20:24:08 +01:00
parent b7db24ea11
commit fbe5ea4db9
No known key found for this signature in database
GPG Key ID: A78AC64694F84063
2 changed files with 2 additions and 1 deletions

View File

@ -25,6 +25,6 @@ class TracksRepository(override val context: Context?, albumId: Int) : Repositor
data.map { track -> data.map { track ->
track.favorite = favorites.contains(track.id) track.favorite = favorites.contains(track.id)
track track
} }.sortedBy { it.position }
} }
} }

View File

@ -75,6 +75,7 @@ data class Track(
val title: String, val title: String,
val artist: Artist, val artist: Artist,
val album: Album, val album: Album,
val position: Int,
val uploads: List<Upload> val uploads: List<Upload>
) { ) {
var current: Boolean = false var current: Boolean = false