mirror of
https://github.com/antebudimir/tempus.git
synced 2026-01-01 18:03:33 +00:00
Removed cardview overlay where possible
This commit is contained in:
parent
277a07ef92
commit
c190e8777e
21 changed files with 312 additions and 363 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue