Move unsent messages to send service, refactoring

This commit is contained in:
M66B
2019-02-27 20:49:49 +00:00
parent 39b4715915
commit 889450d5af
4 changed files with 42 additions and 25 deletions

View File

@@ -82,11 +82,13 @@ public interface DaoAccount {
", (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) AS operations" +
", (SELECT COUNT(operation.id) FROM operation" +
" WHERE operation.name = '" + EntityOperation.SEND + "') AS unsent")
" WHERE account.synchronize) AS operations")
LiveData<TupleAccountStats> liveStats();
@Query("SELECT COUNT(operation.id) FROM operation" +
" WHERE operation.name = '" + EntityOperation.SEND + "'")
LiveData<Integer> liveUnsent();
@Query("SELECT account.id, swipe_left, l.type AS left_type, swipe_right, r.type AS right_type" +
" FROM account" +
" LEFT JOIN folder l ON l.id = account.swipe_left" +