Added send idle status

This commit is contained in:
M66B
2020-03-11 10:09:52 +01:00
parent f88a1c8064
commit d9e5608b89
4 changed files with 52 additions and 9 deletions

View File

@@ -87,12 +87,15 @@ public interface DaoOperation {
" AND (NOT folder.account IS NULL OR identity.synchronize IS NULL OR identity.synchronize)")
LiveData<TupleOperationStats> liveStats();
@Query("SELECT COUNT(operation.id) FROM operation" +
@Query("SELECT" +
" COUNT(operation.id) AS count" +
", SUM(CASE WHEN operation.state = 'executing' THEN 1 ELSE 0 END) AS busy" +
" FROM operation" +
" JOIN message ON message.id = operation.message" +
" JOIN identity ON identity.id = message.identity" +
" WHERE operation.name = '" + EntityOperation.SEND + "'" +
" AND identity.synchronize")
LiveData<Integer> liveUnsent();
LiveData<TupleUnsent> liveUnsent();
@Query("SELECT * FROM operation ORDER BY id")
List<EntityOperation> getOperations();