Long press 'write' to go to drafts

This commit is contained in:
M66B
2018-12-05 08:10:03 +01:00
parent 67b22a8cd4
commit 5c17b32e09
3 changed files with 29 additions and 11 deletions

View File

@@ -78,6 +78,12 @@ public interface DaoFolder {
" GROUP BY folder.id")
LiveData<List<TupleFolderEx>> liveUnified();
@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" +
", COUNT(message.id) AS messages" +
", SUM(CASE WHEN message.content = 1 THEN 1 ELSE 0 END) AS content" +