Deleted all references from the adapters and dialogs to the old queue management system

This commit is contained in:
CappielloAntonio 2021-12-29 10:22:10 +01:00
parent 4e968a8c4b
commit a32c39867f
18 changed files with 286 additions and 292 deletions

View file

@ -5,7 +5,9 @@ import android.app.Application;
import androidx.lifecycle.LiveData;
import com.cappielloantonio.play.database.AppDatabase;
import com.cappielloantonio.play.database.dao.DownloadDao;
import com.cappielloantonio.play.database.dao.QueueDao;
import com.cappielloantonio.play.model.Download;
import com.cappielloantonio.play.model.Queue;
import com.cappielloantonio.play.model.Song;
import com.cappielloantonio.play.util.MappingUtil;
@ -46,6 +48,12 @@ public class QueueRepository {
return songs;
}
public void insertAll(List<Song> songs) {
InsertAllThreadSafe insertAll = new InsertAllThreadSafe(queueDao, songs);
Thread thread = new Thread(insertAll);
thread.start();
}
public void insertAllAndStartNew(List<Song> songs) {
try {
final Thread delete = new Thread(new DeleteAllThreadSafe(queueDao));