From c2156b33fd21ad4631ea31d1fad17e16ae9e300b Mon Sep 17 00:00:00 2001 From: M66B Date: Thu, 11 Apr 2019 12:09:20 +0200 Subject: [PATCH] Added no identities warning --- .../main/java/eu/faircode/email/FragmentSetup.java | 4 ++++ app/src/main/res/layout/fragment_setup.xml | 14 +++++++++++++- app/src/main/res/values/strings.xml | 1 + 3 files changed, 18 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/eu/faircode/email/FragmentSetup.java b/app/src/main/java/eu/faircode/email/FragmentSetup.java index fadae369f4..7083b71e7f 100644 --- a/app/src/main/java/eu/faircode/email/FragmentSetup.java +++ b/app/src/main/java/eu/faircode/email/FragmentSetup.java @@ -61,6 +61,7 @@ public class FragmentSetup extends FragmentBase { private TextView tvIdentityDone; private Button btnIdentity; + private TextView tvNoIdentities; private TextView tvPermissionsDone; private Button btnPermissions; @@ -102,6 +103,7 @@ public class FragmentSetup extends FragmentBase { tvIdentityDone = view.findViewById(R.id.tvIdentityDone); btnIdentity = view.findViewById(R.id.btnIdentity); + tvNoIdentities = view.findViewById(R.id.tvNoIdentities); tvPermissionsDone = view.findViewById(R.id.tvPermissionsDone); btnPermissions = view.findViewById(R.id.btnPermissions); @@ -208,6 +210,7 @@ public class FragmentSetup extends FragmentBase { tvIdentityDone.setText(null); tvIdentityDone.setCompoundDrawables(null, null, null, null); btnIdentity.setEnabled(false); + tvNoIdentities.setVisibility(View.GONE); tvPermissionsDone.setText(null); tvPermissionsDone.setCompoundDrawables(null, null, null, null); @@ -300,6 +303,7 @@ public class FragmentSetup extends FragmentBase { tvIdentityDone.setText(done ? R.string.title_setup_done : R.string.title_setup_to_do); tvIdentityDone.setTextColor(done ? textColorPrimary : colorWarning); tvIdentityDone.setCompoundDrawablesWithIntrinsicBounds(done ? check : null, null, null, null); + tvNoIdentities.setVisibility(done ? View.GONE : View.VISIBLE); } }); diff --git a/app/src/main/res/layout/fragment_setup.xml b/app/src/main/res/layout/fragment_setup.xml index 8b3cfa4a8c..d9ed016635 100644 --- a/app/src/main/res/layout/fragment_setup.xml +++ b/app/src/main/res/layout/fragment_setup.xml @@ -192,6 +192,18 @@ app:layout_constraintEnd_toEndOf="parent" app:layout_constraintTop_toTopOf="@id/tvIdentityDone" /> + + + app:layout_constraintTop_toBottomOf="@id/tvNoIdentities" /> Password missing Inbox not found No primary account or no drafts folder + Sending emails requires at least one identity This provider does not support push messages. This will delay reception of new messages and increase battery usage. This provider does not support UTF-8 Synchronization errors since %1$s