diff --git a/ultrasonic/src/main/kotlin/org/moire/ultrasonic/adapters/TrackViewHolder.kt b/ultrasonic/src/main/kotlin/org/moire/ultrasonic/adapters/TrackViewHolder.kt index 7b8356ec..a7547b46 100644 --- a/ultrasonic/src/main/kotlin/org/moire/ultrasonic/adapters/TrackViewHolder.kt +++ b/ultrasonic/src/main/kotlin/org/moire/ultrasonic/adapters/TrackViewHolder.kt @@ -219,17 +219,15 @@ class TrackViewHolder(val view: View, var adapter: MultiTypeDiffAdapter, save: Boolean) { - // Because of the priority handling we add the songs in the reverse order they - // were requested, then it is correct in the end. - for (song in songs.asReversed()) { + // By using the counter we ensure that the songs are added in the correct order + for (song in songs) { val file = song.getDownloadFile() file.shouldSave = save file.priority = backgroundPriorityCounter++