diff --git a/app/src/main/java/eu/faircode/email/FragmentMessages.java b/app/src/main/java/eu/faircode/email/FragmentMessages.java
index 7c347a115c..445026ca18 100644
--- a/app/src/main/java/eu/faircode/email/FragmentMessages.java
+++ b/app/src/main/java/eu/faircode/email/FragmentMessages.java
@@ -3185,6 +3185,10 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences.
popupMenu.getMenu().findItem(R.id.menu_reply_to_sender).setEnabled(message.content);
popupMenu.getMenu().findItem(R.id.menu_reply_to_all).setEnabled(message.content);
popupMenu.getMenu().findItem(R.id.menu_forward).setEnabled(message.content);
+ popupMenu.getMenu().findItem(R.id.menu_forward_raw)
+ .setEnabled(message.uid != null)
+ .setVisible(!BuildConfig.PLAY_STORE_RELEASE &&
+ (Boolean.TRUE.equals(message.raw) || message.accountProtocol == EntityAccount.TYPE_IMAP));
popupMenu.getMenu().findItem(R.id.menu_editasnew).setEnabled(message.content);
popupMenu.getMenu().findItem(R.id.menu_reply_answer).setEnabled(message.content);
@@ -3243,6 +3247,9 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences.
} else if (itemId == R.id.menu_forward) {
onMenuReply(message, "forward");
return true;
+ } else if (itemId == R.id.menu_forward_raw) {
+ onActionRaw(message.id);
+ return true;
} else if (itemId == R.id.menu_resend) {
onMenuResend(message);
return true;
@@ -3555,7 +3562,7 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences.
onActionSetImportanceSelection(EntityMessage.PRIORITIY_HIGH, false);
return true;
} else if (itemId == R.string.title_raw_send) {
- onActionRaw();
+ onActionRaw(null);
return true;
} else if (itemId == R.string.title_folder_inbox) {
onActionMoveSelection(EntityFolder.INBOX, false);
@@ -3880,12 +3887,12 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences.
}.execute(this, args, "messages:set:importance");
}
- private void onActionRaw() {
+ private void onActionRaw(Long id) {
Bundle args = new Bundle();
- args.putLongArray("ids", getSelection());
+ args.putLongArray("ids", id == null ? getSelection() : new long[]{id});
args.putBoolean("threads", false);
- if (selectionTracker != null)
+ if (id == null && selectionTracker != null)
selectionTracker.clearSelection();
FragmentDialogForwardRaw ask = new FragmentDialogForwardRaw();
diff --git a/app/src/main/res/menu/popup_reply.xml b/app/src/main/res/menu/popup_reply.xml
index 05a6ccf8cd..efb8dbee28 100644
--- a/app/src/main/res/menu/popup_reply.xml
+++ b/app/src/main/res/menu/popup_reply.xml
@@ -30,6 +30,11 @@
android:icon="@drawable/twotone_forward_24"
android:title="@string/title_forward" />
+
+