From 759498ac3aa10f3ee3479bb255453f09f6e43a2e Mon Sep 17 00:00:00 2001 From: Daniel Gultsch Date: Sun, 25 Feb 2018 08:33:04 +0100 Subject: [PATCH] fixed showing QR code on long press --- .../java/eu/siacs/conversations/ui/ConversationFragment.java | 2 +- src/main/java/eu/siacs/conversations/ui/XmppActivity.java | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/main/java/eu/siacs/conversations/ui/ConversationFragment.java b/src/main/java/eu/siacs/conversations/ui/ConversationFragment.java index 9d3e810a2..2e12c0aec 100644 --- a/src/main/java/eu/siacs/conversations/ui/ConversationFragment.java +++ b/src/main/java/eu/siacs/conversations/ui/ConversationFragment.java @@ -847,7 +847,7 @@ public class ConversationFragment extends XmppFragment implements EditMessage.Ke } } } else { - activity.showQrCode(); + activity.showQrCode(conversation.getAccount().getShareableUri()); } }); messageListAdapter.setOnQuoteListener(this::quoteText); diff --git a/src/main/java/eu/siacs/conversations/ui/XmppActivity.java b/src/main/java/eu/siacs/conversations/ui/XmppActivity.java index a00bfb94d..77b5b600d 100644 --- a/src/main/java/eu/siacs/conversations/ui/XmppActivity.java +++ b/src/main/java/eu/siacs/conversations/ui/XmppActivity.java @@ -901,7 +901,10 @@ public abstract class XmppActivity extends AppCompatActivity { } protected void showQrCode() { - final String uri = getShareableUri(); + showQrCode(getShareableUri()); + } + + protected void showQrCode(final String uri) { if (uri == null || uri.isEmpty()) { return; }