Show operation errors in nav menu

This commit is contained in:
M66B
2019-05-04 22:38:11 +02:00
parent 496ce0ae9e
commit f473703299
4 changed files with 38 additions and 5 deletions

View File

@@ -65,8 +65,10 @@ public interface DaoOperation {
@Query(GET_OPS_FOLDER)
LiveData<List<EntityOperation>> liveOperations(long folder);
@Query("SELECT COUNT(operation.id) FROM operation")
LiveData<Integer> liveCount();
@Query("SELECT COUNT(operation.id) AS pending" +
", SUM(CASE WHEN operation.error IS NULL THEN 0 ELSE 1 END) AS errors" +
" FROM operation")
LiveData<TupleOperationStats> liveStats();
@Query("SELECT COUNT(operation.id) FROM operation" +
" WHERE operation.name = '" + EntityOperation.SEND + "'")