Imports optimization and entries rearranged

This commit is contained in:
CappielloAntonio 2021-04-27 11:01:02 +02:00
parent 3c2837e096
commit 65e47f61ef
63 changed files with 987 additions and 1087 deletions

View file

@ -1,7 +1,5 @@
package com.cappielloantonio.play.util;
import android.util.Log;
import com.cappielloantonio.play.model.Queue;
import com.cappielloantonio.play.model.Song;
@ -19,7 +17,7 @@ public class QueueUtil {
int counter = 0;
List<Queue> queue = new ArrayList<>();
for(Song song: songs) {
for (Song song : songs) {
queue.add(new Queue(counter, song.getId()));
counter++;
}
@ -30,7 +28,7 @@ public class QueueUtil {
public static List<String> getIDsFromSongs(List<Song> songs) {
List<String> IDs = new ArrayList<>();
for(Song song: songs) {
for (Song song : songs) {
IDs.add(song.getId());
}
@ -40,9 +38,9 @@ public class QueueUtil {
public static List<Song> orderSongByIdList(List<String> IDs, List<Song> songs) {
List<Song> orderedSong = new ArrayList<>();
for(String ID: IDs) {
for(Song song: songs) {
if(ID.equals(song.getId())) {
for (String ID : IDs) {
for (Song song : songs) {
if (ID.equals(song.getId())) {
orderedSong.add(song);
break;
}