From 719b35e4315a34d29767919bf8d5fc43f6a7b96c Mon Sep 17 00:00:00 2001 From: Daniel Gultsch Date: Sun, 14 Jul 2019 16:39:09 +0200 Subject: [PATCH] prefer attachment in share intent if there is one --- src/main/java/eu/siacs/conversations/ui/ShareWithActivity.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/eu/siacs/conversations/ui/ShareWithActivity.java b/src/main/java/eu/siacs/conversations/ui/ShareWithActivity.java index 9d6385db8..ce64af856 100644 --- a/src/main/java/eu/siacs/conversations/ui/ShareWithActivity.java +++ b/src/main/java/eu/siacs/conversations/ui/ShareWithActivity.java @@ -131,10 +131,11 @@ public class ShareWithActivity extends XmppActivity implements XmppConnectionSer if (Intent.ACTION_SEND.equals(action)) { final String text = intent.getStringExtra(Intent.EXTRA_TEXT); final Uri uri = intent.getParcelableExtra(Intent.EXTRA_STREAM); + if (data != null && "geo".equals(data.getScheme())) { this.share.uris.clear(); this.share.uris.add(data); - } else if (type != null && uri != null && (text == null || !type.equals("text/plain"))) { + } else if (type != null && uri != null) { this.share.uris.clear(); this.share.uris.add(uri); } else {