Add option to order and delete elements from queue by dragging and swiping

This commit is contained in:
CappielloAntonio 2021-04-16 18:00:19 +02:00
parent 49c3d60ed1
commit a2770daaa8
9 changed files with 70 additions and 111 deletions

View file

@ -12,10 +12,12 @@ public class QueueUtil {
}
public static List<Queue> getQueueElementsFromSongs(List<Song> songs) {
int counter = 0;
List<Queue> queue = new ArrayList<>();
for(Song song: songs) {
queue.add(new Queue(song.getId(), 0));
queue.add(new Queue(song.getId(), counter));
counter++;
}
return queue;