mirror of
https://github.com/M66B/FairEmail.git
synced 2026-01-02 19:10:11 +01:00
Fixed identity selection changing, refactoring
This commit is contained in:
@@ -30,18 +30,14 @@ import androidx.room.Update;
|
||||
@Dao
|
||||
public interface DaoIdentity {
|
||||
@Query("SELECT identity.*, account.name AS accountName FROM identity" +
|
||||
" JOIN account ON account.id = identity.account")
|
||||
LiveData<List<TupleIdentityEx>> liveIdentities();
|
||||
|
||||
@Query("SELECT identity.* FROM identity" +
|
||||
" JOIN account ON account.id = identity.account" +
|
||||
" WHERE (:account IS NULL OR account.id = :account)" +
|
||||
" AND account.synchronize = :synchronize" +
|
||||
" AND identity.synchronize = :synchronize")
|
||||
LiveData<List<EntityIdentity>> liveIdentities(Long account, boolean synchronize);
|
||||
" WHERE NOT :synchronize OR account.synchronize")
|
||||
LiveData<List<TupleIdentityEx>> liveIdentities(boolean synchronize);
|
||||
|
||||
@Query("SELECT * FROM identity")
|
||||
List<EntityIdentity> getIdentities();
|
||||
@Query("SELECT identity.*, account.name AS accountName FROM identity" +
|
||||
" JOIN account ON account.id = identity.account" +
|
||||
" WHERE NOT :synchronize OR account.synchronize")
|
||||
List<TupleIdentityEx> getIdentities(boolean synchronize);
|
||||
|
||||
@Query("SELECT * FROM identity WHERE account = :account")
|
||||
List<EntityIdentity> getIdentities(long account);
|
||||
|
||||
Reference in New Issue
Block a user