mirror of
https://github.com/antebudimir/tempus.git
synced 2026-01-02 10:23:33 +00:00
Imports optimization and entries rearranged
This commit is contained in:
parent
3c2837e096
commit
65e47f61ef
63 changed files with 987 additions and 1087 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue