From 5c67dd0188dc644d9023d91437a0487e85b56a82 Mon Sep 17 00:00:00 2001 From: sk Date: Wed, 7 Dec 2022 16:55:10 +0100 Subject: [PATCH] include subject line on external share closes #123 --- .../java/org/joinmastodon/android/ExternalShareActivity.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/mastodon/src/main/java/org/joinmastodon/android/ExternalShareActivity.java b/mastodon/src/main/java/org/joinmastodon/android/ExternalShareActivity.java index 218c16f62..0fd503267 100644 --- a/mastodon/src/main/java/org/joinmastodon/android/ExternalShareActivity.java +++ b/mastodon/src/main/java/org/joinmastodon/android/ExternalShareActivity.java @@ -51,7 +51,10 @@ public class ExternalShareActivity extends FragmentStackActivity{ getWindow().setBackgroundDrawable(null); Intent intent=getIntent(); - String text=intent.getStringExtra(Intent.EXTRA_TEXT); + StringBuilder builder=new StringBuilder(); + if (intent.hasExtra(Intent.EXTRA_SUBJECT)) builder.append(intent.getStringExtra(Intent.EXTRA_SUBJECT)).append("\n"); + if (intent.hasExtra(Intent.EXTRA_TEXT)) builder.append(intent.getStringExtra(Intent.EXTRA_TEXT)).append("\n"); + String text=builder.toString(); List mediaUris; if(Intent.ACTION_SEND.equals(intent.getAction())){ Uri singleUri=intent.getParcelableExtra(Intent.EXTRA_STREAM);