Single sync service

This commit is contained in:
M66B
2019-03-01 19:35:30 +00:00
parent 67ec1908aa
commit c0983d24f5
9 changed files with 62 additions and 238 deletions

View File

@@ -85,6 +85,12 @@ public interface DaoOperation {
" AND message = :message")
int getOperationCount(long folder, long message);
@Query("SELECT COUNT(operation.id) FROM operation" +
" JOIN folder ON folder.id = operation.folder" +
" JOIN account ON account.id = folder.account" + // not outbox
" WHERE account.synchronize")
LiveData<Integer> livePendingOperationsCount();
@Query("UPDATE operation SET error = :error WHERE id = :id")
int setOperationError(long id, String error);