From 234343afe9e2eefc2663669e7a55d8a7d77ef5ca Mon Sep 17 00:00:00 2001 From: M66B Date: Tue, 18 Jan 2022 21:25:49 +0100 Subject: [PATCH] Added priority/sensitivy info buttons --- .../eu/faircode/email/FragmentCompose.java | 18 +++++++ app/src/main/res/layout/dialog_send.xml | 52 +++++++++++++++---- 2 files changed, 60 insertions(+), 10 deletions(-) diff --git a/app/src/main/java/eu/faircode/email/FragmentCompose.java b/app/src/main/java/eu/faircode/email/FragmentCompose.java index 670616f685..a5b0cd7cf8 100644 --- a/app/src/main/java/eu/faircode/email/FragmentCompose.java +++ b/app/src/main/java/eu/faircode/email/FragmentCompose.java @@ -323,6 +323,8 @@ public class FragmentCompose extends FragmentBase { private static final int REQUEST_SEND = 14; private static final int REQUEST_PERMISSION = 15; + private static final String RFC4021 = "https://datatracker.ietf.org/doc/html/rfc4021"; + private static ExecutorService executor = Helper.getBackgroundExecutor(1, "encrypt"); @Override @@ -6957,7 +6959,9 @@ public class FragmentCompose extends FragmentBase { final Spinner spEncrypt = dview.findViewById(R.id.spEncrypt); final ImageButton ibEncryption = dview.findViewById(R.id.ibEncryption); final Spinner spPriority = dview.findViewById(R.id.spPriority); + final ImageButton ibPriority = dview.findViewById(R.id.ibPriority); final Spinner spSensitivity = dview.findViewById(R.id.spSensitivity); + final ImageButton ibSensitivity = dview.findViewById(R.id.ibSensitivity); final TextView tvSendAt = dview.findViewById(R.id.tvSendAt); final ImageButton ibSendAt = dview.findViewById(R.id.ibSendAt); final CheckBox cbArchive = dview.findViewById(R.id.cbArchive); @@ -7220,6 +7224,13 @@ public class FragmentCompose extends FragmentBase { } }); + ibPriority.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View v) { + Helper.view(v.getContext(), Uri.parse(RFC4021 + "#section-2.1.54"), true); + } + }); + spSensitivity.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() { @Override public void onItemSelected(AdapterView parent, View view, int position, long id) { @@ -7261,6 +7272,13 @@ public class FragmentCompose extends FragmentBase { } }); + ibSensitivity.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View v) { + Helper.view(v.getContext(), Uri.parse(RFC4021 + "#section-2.1.55"), true); + } + }); + View.OnClickListener sendAt = new View.OnClickListener() { @Override public void onClick(View view) { diff --git a/app/src/main/res/layout/dialog_send.xml b/app/src/main/res/layout/dialog_send.xml index 5c5b974571..a94c4415ce 100644 --- a/app/src/main/res/layout/dialog_send.xml +++ b/app/src/main/res/layout/dialog_send.xml @@ -357,15 +357,17 @@ + app:srcCompat="@drawable/twotone_info_24" + app:tint="?attr/colorAccent" /> + + + +