mirror of
https://github.com/M66B/FairEmail.git
synced 2025-02-25 15:32:52 +00:00
Improved error message
This commit is contained in:
parent
9df27c1240
commit
ab8f519808
4 changed files with 15 additions and 9 deletions
|
@ -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);
|
||||
|
|
|
@ -547,7 +547,7 @@
|
|||
<string name="title_no_password">Password missing</string>
|
||||
<string name="title_no_inbox">Inbox not found</string>
|
||||
<string name="title_no_primary_drafts">No primary account or no drafts folder</string>
|
||||
<string name="title_no_identities">Sending emails requires at least one identity</string>
|
||||
<string name="title_no_identities">Sending emails requires at least one identity and a drafts folder</string>
|
||||
<string name="title_no_standard">This provider uses a proprietary email protocol and therefore it is not possible to use third party email clients</string>
|
||||
<string name="title_no_idle">This provider does not support push messages. This will delay reception of new messages and increase battery usage.</string>
|
||||
<string name="title_no_utf8">This provider does not support UTF-8</string>
|
||||
|
|
Loading…
Reference in a new issue