Added unified folder types

This commit is contained in:
M66B
2019-07-19 08:27:44 +02:00
parent 1f36e69e04
commit 272e691478
11 changed files with 289 additions and 25 deletions

View File

@@ -154,6 +154,15 @@ public interface DaoFolder {
" AND type <> '" + EntityFolder.USER + "'")
List<EntityFolder> getSystemFolders(long account);
@Query("SELECT folder.type" +
" FROM folder" +
" JOIN account ON account.id = folder.account" +
" WHERE folder.synchronize" +
" AND account.synchronize" +
" GROUP BY folder.type" +
" HAVING COUNT(folder.id) > 1")
LiveData<List<String>> liveUnifiedTypes();
@Query("SELECT * FROM folder WHERE id = :id")
EntityFolder getFolder(Long id);