diff --git a/app/src/main/java/eu/faircode/email/AdapterMessage.java b/app/src/main/java/eu/faircode/email/AdapterMessage.java index 55668b9540..c0ae828837 100644 --- a/app/src/main/java/eu/faircode/email/AdapterMessage.java +++ b/app/src/main/java/eu/faircode/email/AdapterMessage.java @@ -4291,6 +4291,8 @@ public class AdapterMessage extends RecyclerView.Adapter() { + @Override + protected String onExecute(Context context, Bundle args) throws IOException { + Long id = args.getLong("id"); + + File file = EntityMessage.getFile(context, id); + Document d = JsoupEx.parse(file); + + return d.html(); + } + + @Override + protected void onExecuted(Bundle args, String html) { + Intent intent = new Intent(Intent.ACTION_SEND); + intent.setType("text/plain"); + intent.putExtra(Intent.EXTRA_TEXT, html); + context.startActivity(intent); + } + + @Override + protected void onException(Bundle args, Throwable ex) { + Log.unexpectedError(parentFragment.getParentFragmentManager(), ex); + } + }.execute(context, owner, args, "message:headers"); + } + private void onMenuRawSave(TupleMessageEx message) { if (message.raw == null || !message.raw) { properties.setValue("raw_save", message.id, true); diff --git a/app/src/main/res/drawable/twotone_source_24.xml b/app/src/main/res/drawable/twotone_source_24.xml new file mode 100644 index 0000000000..92c011a551 --- /dev/null +++ b/app/src/main/res/drawable/twotone_source_24.xml @@ -0,0 +1,15 @@ + + + + diff --git a/app/src/main/res/menu/popup_message_more.xml b/app/src/main/res/menu/popup_message_more.xml index e448f79f89..d4f58442ff 100644 --- a/app/src/main/res/menu/popup_message_more.xml +++ b/app/src/main/res/menu/popup_message_more.xml @@ -109,6 +109,11 @@ android:icon="@drawable/twotone_info_24" android:title="@string/title_show_headers" /> + + Print images Downloading images might take some time Show headers + Share as HTML Save raw message Send as attachment Manage keywords