mirror of https://github.com/M66B/FairEmail.git
Undo query changes
This commit is contained in:
parent
893980f6d6
commit
2498e5be3b
|
@ -60,9 +60,8 @@ public interface DaoAccount {
|
|||
" AND identity.synchronize) AS identities" +
|
||||
", CASE WHEN drafts.id IS NULL THEN 0 ELSE 1 END AS drafts" +
|
||||
" FROM account" +
|
||||
" LEFT JOIN folder AS drafts ON drafts.account = account.id" +
|
||||
" LEFT JOIN folder AS drafts ON drafts.account = account.id AND drafts.type = '" + EntityFolder.DRAFTS + "'" +
|
||||
" WHERE :all OR account.synchronize" +
|
||||
" AND (drafts.type = '" + EntityFolder.DRAFTS + "' OR drafts.type IS NULL)" +
|
||||
" GROUP BY account.id" +
|
||||
" ORDER BY CASE WHEN :all THEN 0 ELSE account.`order` END" +
|
||||
", CASE WHEN :all THEN 0 ELSE account.`primary` END DESC" +
|
||||
|
|
|
@ -36,9 +36,8 @@ public interface DaoIdentity {
|
|||
|
||||
@Query("SELECT identity.*, account.name AS accountName FROM identity" +
|
||||
" JOIN account ON account.id = identity.account" +
|
||||
" JOIN folder ON folder.account = identity.account" +
|
||||
" JOIN folder ON folder.account = identity.account AND folder.type = '" + EntityFolder.DRAFTS + "'" +
|
||||
" WHERE (:account IS NULL OR identity.account = :account)" +
|
||||
" AND folder.type = '" + EntityFolder.DRAFTS + "'" +
|
||||
" AND identity.synchronize" +
|
||||
" AND account.synchronize" +
|
||||
" ORDER BY account.`order`, account.`primary` DESC, account.name COLLATE NOCASE" +
|
||||
|
@ -47,9 +46,8 @@ public interface DaoIdentity {
|
|||
|
||||
@Query("SELECT identity.*, account.name AS accountName FROM identity" +
|
||||
" JOIN account ON account.id = identity.account" +
|
||||
" JOIN folder ON folder.account = identity.account" +
|
||||
" JOIN folder ON folder.account = identity.account AND folder.type = '" + EntityFolder.DRAFTS + "'" +
|
||||
" WHERE (:account IS NULL OR identity.account = :account)" +
|
||||
" AND folder.type = '" + EntityFolder.DRAFTS + "'" +
|
||||
" AND identity.synchronize" +
|
||||
" AND account.synchronize")
|
||||
LiveData<List<TupleIdentityEx>> liveComposableIdentities(Long account);
|
||||
|
|
Loading…
Reference in New Issue