Improved error message

pull/174/head
M66B 5 years ago
parent 9df27c1240
commit ab8f519808

@ -29,18 +29,24 @@ import java.util.List;
@Dao @Dao
public interface DaoIdentity { 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) @Query(TupleIdentityView.query)
LiveData<List<TupleIdentityView>> liveIdentityView(); 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 + "'" +
" AND identity.synchronize" +
" AND account.synchronize")
LiveData<List<TupleIdentityEx>> liveComposableIdentities();
@Query("SELECT identity.*, account.name AS accountName FROM identity" + @Query("SELECT identity.*, account.name AS accountName FROM identity" +
" JOIN account ON account.id = identity.account" + " JOIN account ON account.id = identity.account" +
" JOIN folder ON folder.account = identity.account AND folder.type = '" + EntityFolder.DRAFTS + "'" + " JOIN folder ON folder.account = identity.account AND folder.type = '" + EntityFolder.DRAFTS + "'" +
" WHERE (:account IS NULL OR identity.account = :account)" + " WHERE (:account IS NULL OR account.id = :account)" +
" AND identity.synchronize" + " AND identity.synchronize" +
" AND account.synchronize" + " AND account.synchronize" +
" ORDER BY account.`order`, account.`primary` DESC, account.name COLLATE NOCASE" + " ORDER BY account.`order`, account.`primary` DESC, account.name COLLATE NOCASE" +

@ -128,7 +128,7 @@ public class FragmentIdentities extends FragmentBase {
super.onActivityCreated(savedInstanceState); super.onActivityCreated(savedInstanceState);
// Observe identities // 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 @Override
public void onChanged(@Nullable List<TupleIdentityEx> identities) { public void onChanged(@Nullable List<TupleIdentityEx> identities) {
if (identities == null) 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 @Override
public void onChanged(@Nullable List<TupleIdentityEx> identities) { public void onChanged(@Nullable List<TupleIdentityEx> identities) {
boolean done = (identities != null && identities.size() > 0); boolean done = (identities != null && identities.size() > 0);

@ -547,7 +547,7 @@
<string name="title_no_password">Password missing</string> <string name="title_no_password">Password missing</string>
<string name="title_no_inbox">Inbox not found</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_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_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_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> <string name="title_no_utf8">This provider does not support UTF-8</string>

Loading…
Cancel
Save