don't add subject if blank

closes #240
This commit is contained in:
sk 2023-01-09 10:30:49 +01:00 committed by LucasGGamerM
parent 786dbaf92c
commit c9cc8e23c1
1 changed files with 4 additions and 1 deletions

View File

@ -53,7 +53,10 @@ public class ExternalShareActivity extends FragmentStackActivity{
Intent intent=getIntent(); Intent intent=getIntent();
StringBuilder builder=new StringBuilder(); StringBuilder builder=new StringBuilder();
String subject = ""; String subject = "";
if (intent.hasExtra(Intent.EXTRA_SUBJECT)) builder.append(subject = intent.getStringExtra(Intent.EXTRA_SUBJECT)).append("\n\n"); if (intent.hasExtra(Intent.EXTRA_SUBJECT)) {
subject = intent.getStringExtra(Intent.EXTRA_SUBJECT);
if (!subject.isBlank()) builder.append(subject).append("\n\n");
}
if (intent.hasExtra(Intent.EXTRA_TEXT)) builder.append(intent.getStringExtra(Intent.EXTRA_TEXT)).append("\n"); if (intent.hasExtra(Intent.EXTRA_TEXT)) builder.append(intent.getStringExtra(Intent.EXTRA_TEXT)).append("\n");
String text=builder.toString(); String text=builder.toString();
List<Uri> mediaUris; List<Uri> mediaUris;