Browse Source

Sort album view by track position.

housekeeping/remove-warnings
Antoine POPINEAU 5 years ago
parent
commit
fbe5ea4db9
No known key found for this signature in database
GPG Key ID: A78AC64694F84063
  1. 2
      app/src/main/java/com/github/apognu/otter/repositories/TracksRepository.kt
  2. 1
      app/src/main/java/com/github/apognu/otter/utils/Models.kt

2
app/src/main/java/com/github/apognu/otter/repositories/TracksRepository.kt

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

1
app/src/main/java/com/github/apognu/otter/utils/Models.kt

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

Loading…
Cancel
Save