mirror of
https://github.com/CappielloAntonio/tempo.git
synced 2026-02-02 07:23:36 +00:00
Removed cardview overlay where possible
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user