Skip polling of on demand accounts

This commit is contained in:
M66B
2020-01-22 21:39:38 +01:00
parent 8b76023b1b
commit 3ed182530d
2 changed files with 15 additions and 9 deletions

View File

@@ -37,6 +37,13 @@ public interface DaoAccount {
" ORDER BY `order`, `primary` DESC, name COLLATE NOCASE")
List<EntityAccount> getSynchronizingAccounts();
@Query("SELECT * FROM account" +
" WHERE (:id IS NULL OR id = :id)" +
" AND synchronize" +
" AND NOT ondemand" +
" ORDER BY `order`, `primary` DESC, name COLLATE NOCASE")
List<EntityAccount> getPollAccounts(Long id);
@Query("SELECT * FROM account WHERE synchronize")
LiveData<List<EntityAccount>> liveSynchronizingAccounts();