From bd765c59cefc408d24240c93146ffaf03b74ae3a Mon Sep 17 00:00:00 2001 From: Daniel Gultsch Date: Sat, 5 Dec 2015 19:03:17 +0100 Subject: [PATCH] check availabiltiy of pgp before sharing files --- .../java/eu/siacs/conversations/ui/ShareWithActivity.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main/java/eu/siacs/conversations/ui/ShareWithActivity.java b/src/main/java/eu/siacs/conversations/ui/ShareWithActivity.java index 8ec44f4e5..35f1ff359 100644 --- a/src/main/java/eu/siacs/conversations/ui/ShareWithActivity.java +++ b/src/main/java/eu/siacs/conversations/ui/ShareWithActivity.java @@ -192,6 +192,10 @@ public class ShareWithActivity extends XmppActivity { } private void share(final Conversation conversation) { + if (conversation.getNextEncryption() == Message.ENCRYPTION_PGP && !hasPgp()) { + showInstallPgpDialog(); + return; + } if (share.uris.size() != 0) { OnPresenceSelected callback = new OnPresenceSelected() { @Override