aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorChristian S <christian@pix-art.de>2015-07-19 11:21:24 +0200
committerChristian S <christian@pix-art.de>2015-07-19 11:21:24 +0200
commit7640c4d1d44ef9d83be4ad23ae4481879d0c351b (patch)
treec7fd129415c0e409c2a8cca81ea98da53ef60de8 /src
parent733d12d4964ea4e3c5267d4d7805cd385f9fd41d (diff)
show contact details in context menu...
...in conference details on long pressing on a contact
Diffstat (limited to '')
-rw-r--r--src/main/java/eu/siacs/conversations/ui/ConferenceDetailsActivity.java5
-rw-r--r--src/main/res/menu/muc_details_context.xml6
2 files changed, 10 insertions, 1 deletions
diff --git a/src/main/java/eu/siacs/conversations/ui/ConferenceDetailsActivity.java b/src/main/java/eu/siacs/conversations/ui/ConferenceDetailsActivity.java
index b76689ad3..2241474f4 100644
--- a/src/main/java/eu/siacs/conversations/ui/ConferenceDetailsActivity.java
+++ b/src/main/java/eu/siacs/conversations/ui/ConferenceDetailsActivity.java
@@ -274,6 +274,7 @@ public class ConferenceDetailsActivity extends XmppActivity implements OnConvers
name = user.getJid().toBareJid().toString();
}
menu.setHeaderTitle(name);
+ MenuItem showContactDetails = menu.findItem(R.id.action_contact_details);
MenuItem startConversation = menu.findItem(R.id.start_conversation);
MenuItem giveMembership = menu.findItem(R.id.give_membership);
MenuItem removeMembership = menu.findItem(R.id.remove_membership);
@@ -282,6 +283,7 @@ public class ConferenceDetailsActivity extends XmppActivity implements OnConvers
MenuItem removeFromRoom = menu.findItem(R.id.remove_from_room);
MenuItem banFromConference = menu.findItem(R.id.ban_from_conference);
startConversation.setVisible(true);
+ showContactDetails.setVisible(true);
if (self.getAffiliation().ranks(MucOptions.Affiliation.ADMIN) &&
self.getAffiliation().outranks(user.getAffiliation())) {
if (mAdvancedMode) {
@@ -309,6 +311,9 @@ public class ConferenceDetailsActivity extends XmppActivity implements OnConvers
@Override
public boolean onContextItemSelected(MenuItem item) {
switch (item.getItemId()) {
+ case R.id.action_contact_details:
+ switchToContactDetails(mSelectedUser.getContact());
+ return true;
case R.id.start_conversation:
startConversation(mSelectedUser);
return true;
diff --git a/src/main/res/menu/muc_details_context.xml b/src/main/res/menu/muc_details_context.xml
index dc0f5d3eb..e691e858a 100644
--- a/src/main/res/menu/muc_details_context.xml
+++ b/src/main/res/menu/muc_details_context.xml
@@ -1,6 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android">
- <item
+ <item
+ android:id="@+id/action_contact_details"
+ android:title="@string/action_contact_details"
+ android:visible="false" />
+ <item
android:id="@+id/start_conversation"
android:title="@string/start_conversation"
android:visible="false" />