Refactoring composables

This commit is contained in:
M66B
2019-02-10 17:39:27 +00:00
parent 3edfb7b0bf
commit d5dd01db6e
5 changed files with 134 additions and 124 deletions

View File

@@ -91,12 +91,6 @@ public interface DaoFolder {
" WHERE `primary` AND type = '" + EntityFolder.ARCHIVE + "'")
LiveData<EntityFolder> livePrimaryArchive();
@Query("SELECT folder.* FROM folder" +
" JOIN account ON account.id = folder.account" +
" WHERE folder.type = '" + EntityFolder.DRAFTS + "'" +
" AND (account.id = :account OR (:account IS NULL AND account.`primary`))")
LiveData<EntityFolder> liveDrafts(Long account);
@Query("SELECT folder.*, account.name AS accountName, account.color AS accountColor, account.pop as accountPop, account.state AS accountState" +
", COUNT(message.id) AS messages" +
", SUM(CASE WHEN message.content = 1 THEN 1 ELSE 0 END) AS content" +