Removed cardview overlay where possible

This commit is contained in:
CappielloAntonio 2021-04-16 10:08:31 +02:00
parent 277a07ef92
commit c190e8777e
21 changed files with 312 additions and 363 deletions

View file

@ -108,6 +108,12 @@ public class QueueRepository {
thread.start();
}
public void deleteByPosition(int position) {
DeleteByPositionThreadSafe delete = new DeleteByPositionThreadSafe(queueDao, position);
Thread thread = new Thread(delete);
thread.start();
}
public void deleteAll() {
DeleteAllThreadSafe delete = new DeleteAllThreadSafe(queueDao);
Thread thread = new Thread(delete);
@ -189,6 +195,21 @@ public class QueueRepository {
}
}
private static class DeleteByPositionThreadSafe implements Runnable {
private QueueDao queueDao;
private int position;
public DeleteByPositionThreadSafe(QueueDao queueDao,int position) {
this.queueDao = queueDao;
this.position = position;
}
@Override
public void run() {
queueDao.deleteByPosition(position);
}
}
private static class CountThreadSafe implements Runnable {
private QueueDao queueDao;
private int count = 0;