diff --git a/app/src/main/java/eu/faircode/email/FragmentAccount.java b/app/src/main/java/eu/faircode/email/FragmentAccount.java index 25f69157a6..c1a033f5da 100644 --- a/app/src/main/java/eu/faircode/email/FragmentAccount.java +++ b/app/src/main/java/eu/faircode/email/FragmentAccount.java @@ -123,6 +123,7 @@ public class FragmentAccount extends FragmentBase { private ArrayAdapter adapter; private Spinner spDrafts; private Spinner spSent; + private TextView tvSentWarning; private Spinner spArchive; private Spinner spTrash; private Spinner spJunk; @@ -228,6 +229,7 @@ public class FragmentAccount extends FragmentBase { spDrafts = view.findViewById(R.id.spDrafts); spSent = view.findViewById(R.id.spSent); + tvSentWarning = view.findViewById(R.id.tvSentWarning); spArchive = view.findViewById(R.id.spArchive); spTrash = view.findViewById(R.id.spTrash); spJunk = view.findViewById(R.id.spJunk); @@ -482,6 +484,19 @@ public class FragmentAccount extends FragmentBase { spTrash.setAdapter(adapter); spJunk.setAdapter(adapter); + tvSentWarning.setVisibility(View.GONE); + spSent.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() { + @Override + public void onItemSelected(AdapterView parent, View view, int position, long id) { + tvSentWarning.setVisibility(position == 0 ? View.VISIBLE : View.GONE); + } + + @Override + public void onNothingSelected(AdapterView parent) { + tvSentWarning.setVisibility(View.VISIBLE); + } + }); + adapterSwipe = new ArrayAdapter(getContext(), R.layout.spinner_item1, android.R.id.text1, new ArrayList()) { @NonNull @Override diff --git a/app/src/main/java/eu/faircode/email/FragmentDialogAccount.java b/app/src/main/java/eu/faircode/email/FragmentDialogAccount.java index f81aaf714a..8f2b8f8d23 100644 --- a/app/src/main/java/eu/faircode/email/FragmentDialogAccount.java +++ b/app/src/main/java/eu/faircode/email/FragmentDialogAccount.java @@ -52,6 +52,7 @@ public class FragmentDialogAccount extends FragmentDialogBase { final TextView tvInbox = dview.findViewById(R.id.tvInbox); final TextView tvDrafts = dview.findViewById(R.id.tvDrafts); final TextView tvSent = dview.findViewById(R.id.tvSent); + final TextView tvSentWarning = dview.findViewById(R.id.tvSentWarning); final TextView tvTrash = dview.findViewById(R.id.tvTrash); final TextView tvJunk = dview.findViewById(R.id.tvJunk); final TextView tvArchive = dview.findViewById(R.id.tvArchive); @@ -76,6 +77,8 @@ public class FragmentDialogAccount extends FragmentDialogBase { tvLeft.setText(null); tvRight.setText(null); + tvSentWarning.setVisibility(View.GONE); + Bundle args = getArguments(); final long account = args.getLong("account"); @@ -132,6 +135,7 @@ public class FragmentDialogAccount extends FragmentDialogBase { types.contains(EntityFolder.DRAFTS) ? check : close, null, null, null); tvSent.setCompoundDrawablesRelative( types.contains(EntityFolder.SENT) ? check : close, null, null, null); + tvSentWarning.setVisibility(types.contains(EntityFolder.SENT) ? View.GONE : View.VISIBLE); tvTrash.setCompoundDrawablesRelative( types.contains(EntityFolder.TRASH) ? check : close, null, null, null); tvJunk.setCompoundDrawablesRelative( diff --git a/app/src/main/res/layout/dialog_review_account.xml b/app/src/main/res/layout/dialog_review_account.xml index 1707563a15..8348a8a2fe 100644 --- a/app/src/main/res/layout/dialog_review_account.xml +++ b/app/src/main/res/layout/dialog_review_account.xml @@ -69,6 +69,18 @@ app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toBottomOf="@+id/tvDrafts" /> + + + app:layout_constraintTop_toBottomOf="@+id/tvSentWarning" /> + + + app:layout_constraintTop_toBottomOf="@id/tvSentWarning" /> Inbox not found When enrolled in the advanced protection program it is not possible to use a third party email app. This is a restriction imposed by Google. An account has successfully been added + Sent messages might not be stored! To edit the name, color, swipe actions, etc Manage Grant