diff --git a/FAQ.md b/FAQ.md index 3c1292af57..57bb8efec1 100644 --- a/FAQ.md +++ b/FAQ.md @@ -517,9 +517,10 @@ So, unless your provider can enable this extension, you cannot use FairEmail for **(12) How does encryption/decryption work?** First of all you need to install and configure [OpenKeychain](https://f-droid.org/en/packages/org.sufficientlysecure.keychain/). + To encrypt and send a message just check the menu *Encrypt* and the message will be encrypted on sending. -To decrypt a received message, open the message and tap the padlock icon just below the grey message action bar. -If the message is inline encrypted (not advised), select the menu *Decrypt* in the message 'more' three dots menu. + +To decrypt a received message, open the message and just tap the padlock icon just below the grey message action bar. The first time you send an encrypted message you might be asked for a sign key. FairEmail will automatically store the sign key ID in the selected identity for the next time. diff --git a/app/src/main/java/eu/faircode/email/AdapterMessage.java b/app/src/main/java/eu/faircode/email/AdapterMessage.java index c80f254c6a..eff0b80643 100644 --- a/app/src/main/java/eu/faircode/email/AdapterMessage.java +++ b/app/src/main/java/eu/faircode/email/AdapterMessage.java @@ -1210,6 +1210,7 @@ public class AdapterMessage extends RecyclerView.Adapter(); properties.setAttachments(message.id, attachments); + boolean iencrypted = properties.getValue("iencrypted", message.id); boolean show_inline = properties.getValue("inline", message.id); Log.i("Show inline=" + show_inline); @@ -1260,7 +1261,7 @@ public class AdapterMessage extends RecyclerView.Adapter 0); - popupMenu.getMenu().findItem(R.id.menu_resync).setEnabled(message.uid != null); popupMenu.getMenu().findItem(R.id.menu_create_rule).setEnabled(!message.accountPop); @@ -2461,9 +2459,6 @@ public class AdapterMessage extends RecyclerView.Adapter= 0 && begin < end); + + // Check for images boolean has_images = false; for (Element img : document.select("img")) { if (inline) { @@ -2560,12 +2561,14 @@ public class AdapterMessage extends RecyclerView.Adapter DUPLICATE_ORDER = Collections.unmodifiableList(Arrays.asList( EntityFolder.INBOX, EntityFolder.OUTBOX, @@ -3803,10 +3799,10 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences. if (file.exists()) { // https://tools.ietf.org/html/rfc4880#section-6.2 String body = Helper.readText(file); - int begin = body.indexOf(PGP_BEGIN_MESSAGE); - int end = body.indexOf(PGP_END_MESSAGE); + int begin = body.indexOf(Helper.PGP_BEGIN_MESSAGE); + int end = body.indexOf(Helper.PGP_END_MESSAGE); if (begin >= 0 && begin < end) { - String section = body.substring(begin, end + PGP_END_MESSAGE.length()); + String section = body.substring(begin, end + Helper.PGP_END_MESSAGE.length()); String[] lines = section.split("
"); List disarmored = new ArrayList<>(); for (String line : lines) diff --git a/app/src/main/java/eu/faircode/email/Helper.java b/app/src/main/java/eu/faircode/email/Helper.java index 62212c55ae..bbc5f65113 100644 --- a/app/src/main/java/eu/faircode/email/Helper.java +++ b/app/src/main/java/eu/faircode/email/Helper.java @@ -114,6 +114,9 @@ public class Helper { static final int BUFFER_SIZE = 8192; // Same as in Files class + static final String PGP_BEGIN_MESSAGE = "-----BEGIN PGP MESSAGE-----"; + static final String PGP_END_MESSAGE = "-----END PGP MESSAGE-----"; + static final String FAQ_URI = "https://github.com/M66B/FairEmail/blob/master/FAQ.md"; static final String XDA_URI = "https://forum.xda-developers.com/showthread.php?t=3824168"; static final String SUPPORT_URI = "https://contact.faircode.eu/?product=fairemailsupport"; diff --git a/app/src/main/res/menu/popup_message_more.xml b/app/src/main/res/menu/popup_message_more.xml index 400c460e27..71ed02e246 100644 --- a/app/src/main/res/menu/popup_message_more.xml +++ b/app/src/main/res/menu/popup_message_more.xml @@ -24,10 +24,6 @@ android:id="@+id/menu_junk" android:title="@string/title_spam" /> - -