Set first new account/identity primary only

This commit is contained in:
M66B
2018-09-07 06:52:19 +00:00
parent e1447ad132
commit ee08ec2597
3 changed files with 28 additions and 2 deletions

View File

@@ -48,8 +48,8 @@ public interface DaoIdentity {
@Query("SELECT * FROM identity WHERE id = :id")
LiveData<EntityIdentity> liveIdentity(long id);
@Query("SELECT * FROM identity WHERE account = :account AND `primary`")
EntityIdentity getPrimaryIdentity(long account);
@Query("SELECT COUNT(*) FROM identity WHERE synchronize")
int getSynchronizingIdentityCount();
@Insert
long insertIdentity(EntityIdentity identity);