aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/de/pixart
diff options
context:
space:
mode:
authorChristian Schneppe <christian@pix-art.de>2018-04-29 15:55:44 +0200
committerChristian Schneppe <christian@pix-art.de>2018-04-29 15:55:44 +0200
commit8d58a17aadd50320d1bdde4769cd05fe4c5750c2 (patch)
treeed3e0a636a3335dcadbd53e1eb3f0faa179ce630 /src/main/java/de/pixart
parentfdc2dcd62effce445a148ed6ebfa8192cfb4fd13 (diff)
provide access to show qr code from context menu in start conversation activity
Diffstat (limited to 'src/main/java/de/pixart')
-rw-r--r--src/main/java/de/pixart/messenger/ui/StartConversationActivity.java17
1 files changed, 9 insertions, 8 deletions
diff --git a/src/main/java/de/pixart/messenger/ui/StartConversationActivity.java b/src/main/java/de/pixart/messenger/ui/StartConversationActivity.java
index d3fedbef4..2f72964fc 100644
--- a/src/main/java/de/pixart/messenger/ui/StartConversationActivity.java
+++ b/src/main/java/de/pixart/messenger/ui/StartConversationActivity.java
@@ -347,11 +347,6 @@ public class StartConversationActivity extends XmppActivity implements XmppConne
switchToConversation(conversation);
}
- protected void openConversationForContact() {
- int position = contact_context_id;
- openConversationForContact(position);
- }
-
protected void openConversationForBookmark() {
openConversationForBookmark(conference_context_id);
}
@@ -399,6 +394,12 @@ public class StartConversationActivity extends XmppActivity implements XmppConne
switchToContactDetails(contact);
}
+ protected void showQrForContact() {
+ int position = contact_context_id;
+ Contact contact = (Contact) contacts.get(position);
+ showQrCode("xmpp:" + contact.getJid().asBareJid().toEscapedString());
+ }
+
protected void toggleContactBlock() {
final int position = contact_context_id;
BlockContactDialog.show(this, (Contact) contacts.get(position));
@@ -1061,12 +1062,12 @@ public class StartConversationActivity extends XmppActivity implements XmppConne
return true;
}
switch (item.getItemId()) {
- case R.id.context_start_conversation:
- activity.openConversationForContact();
- break;
case R.id.context_contact_details:
activity.openDetailsForContact();
break;
+ case R.id.context_show_qr:
+ activity.showQrForContact();
+ break;
case R.id.context_contact_block_unblock:
activity.toggleContactBlock();
break;