mirror of
https://github.com/M66B/FairEmail.git
synced 2026-04-09 18:43:23 +02:00
Improved error message
This commit is contained in:
@@ -29,18 +29,24 @@ import java.util.List;
|
||||
|
||||
@Dao
|
||||
public interface DaoIdentity {
|
||||
@Query("SELECT identity.*, account.name AS accountName FROM identity" +
|
||||
" JOIN account ON account.id = identity.account" +
|
||||
" WHERE NOT :synchronize OR account.synchronize")
|
||||
LiveData<List<TupleIdentityEx>> liveIdentities(boolean synchronize);
|
||||
|
||||
@Query(TupleIdentityView.query)
|
||||
LiveData<List<TupleIdentityView>> liveIdentityView();
|
||||
|
||||
@Query("SELECT identity.*, account.name AS accountName FROM identity" +
|
||||
" JOIN account ON account.id = identity.account")
|
||||
LiveData<List<TupleIdentityEx>> liveIdentities();
|
||||
|
||||
@Query("SELECT identity.*, account.name AS accountName FROM identity" +
|
||||
" JOIN account ON account.id = identity.account" +
|
||||
" JOIN folder ON folder.account = identity.account AND folder.type = '" + EntityFolder.DRAFTS + "'" +
|
||||
" WHERE (:account IS NULL OR identity.account = :account)" +
|
||||
" AND identity.synchronize" +
|
||||
" AND account.synchronize")
|
||||
LiveData<List<TupleIdentityEx>> liveComposableIdentities();
|
||||
|
||||
@Query("SELECT identity.*, account.name AS accountName FROM identity" +
|
||||
" JOIN account ON account.id = identity.account" +
|
||||
" JOIN folder ON folder.account = identity.account AND folder.type = '" + EntityFolder.DRAFTS + "'" +
|
||||
" WHERE (:account IS NULL OR account.id = :account)" +
|
||||
" AND identity.synchronize" +
|
||||
" AND account.synchronize" +
|
||||
" ORDER BY account.`order`, account.`primary` DESC, account.name COLLATE NOCASE" +
|
||||
|
||||
@@ -128,7 +128,7 @@ public class FragmentIdentities extends FragmentBase {
|
||||
super.onActivityCreated(savedInstanceState);
|
||||
|
||||
// Observe identities
|
||||
DB.getInstance(getContext()).identity().liveIdentities(false).observe(getViewLifecycleOwner(), new Observer<List<TupleIdentityEx>>() {
|
||||
DB.getInstance(getContext()).identity().liveIdentities().observe(getViewLifecycleOwner(), new Observer<List<TupleIdentityEx>>() {
|
||||
@Override
|
||||
public void onChanged(@Nullable List<TupleIdentityEx> identities) {
|
||||
if (identities == null)
|
||||
|
||||
@@ -394,7 +394,7 @@ public class FragmentSetup extends FragmentBase {
|
||||
}
|
||||
});
|
||||
|
||||
db.identity().liveIdentities(true).observe(getViewLifecycleOwner(), new Observer<List<TupleIdentityEx>>() {
|
||||
db.identity().liveComposableIdentities().observe(getViewLifecycleOwner(), new Observer<List<TupleIdentityEx>>() {
|
||||
@Override
|
||||
public void onChanged(@Nullable List<TupleIdentityEx> identities) {
|
||||
boolean done = (identities != null && identities.size() > 0);
|
||||
|
||||
Reference in New Issue
Block a user