Added synchronize on demand setting

This commit is contained in:
M66B
2019-02-17 18:29:00 +00:00
parent 3dda075978
commit d597366f17
12 changed files with 1569 additions and 12 deletions

View File

@@ -32,8 +32,10 @@ public interface DaoAccount {
@Query("SELECT * FROM account")
List<EntityAccount> getAccounts();
@Query("SELECT * FROM account WHERE synchronize = :synchronize")
List<EntityAccount> getAccounts(boolean synchronize);
@Query("SELECT * FROM account" +
" WHERE synchronize" +
" AND (:all OR NOT ondemand)")
List<EntityAccount> getSynchronizingAccounts(boolean all);
@Query("SELECT * FROM account WHERE tbd = 1")
List<EntityAccount> getAccountsTbd();
@@ -41,8 +43,10 @@ public interface DaoAccount {
@Query("SELECT * FROM account")
LiveData<List<EntityAccount>> liveAccounts();
@Query("SELECT * FROM account WHERE synchronize = :synchronize")
LiveData<List<EntityAccount>> liveAccounts(boolean synchronize);
@Query("SELECT * FROM account" +
" WHERE synchronize")
// including on demand
LiveData<List<EntityAccount>> liveSynchronizingAccounts();
@Query("SELECT *" +
", (SELECT COUNT(message.id)" +