aboutsummaryrefslogtreecommitdiffstats
path: root/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/eu/siacs/conversations/ui/ConferenceDetailsActivity.java12
-rw-r--r--src/main/res/menu/muc_details_context.xml48
-rw-r--r--src/main/res/values-v21/themes.xml3
3 files changed, 40 insertions, 23 deletions
diff --git a/src/main/java/eu/siacs/conversations/ui/ConferenceDetailsActivity.java b/src/main/java/eu/siacs/conversations/ui/ConferenceDetailsActivity.java
index 5138047d..475bc423 100644
--- a/src/main/java/eu/siacs/conversations/ui/ConferenceDetailsActivity.java
+++ b/src/main/java/eu/siacs/conversations/ui/ConferenceDetailsActivity.java
@@ -273,6 +273,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);
@@ -281,6 +282,9 @@ 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);
+ if (contact != null) {
+ showContactDetails.setVisible(true);
+ }
if (self.getAffiliation().ranks(MucOptions.Affiliation.ADMIN) &&
self.getAffiliation().outranks(user.getAffiliation())) {
if (mAdvancedMode) {
@@ -302,12 +306,18 @@ public class ConferenceDetailsActivity extends XmppActivity implements OnConvers
}
}
- super.onCreateContextMenu(menu,v,menuInfo);
+ super.onCreateContextMenu(menu, v, menuInfo);
}
@Override
public boolean onContextItemSelected(MenuItem item) {
switch (item.getItemId()) {
+ case R.id.action_contact_details:
+ Contact contact = mSelectedUser.getContact();
+ if (contact != null) {
+ switchToContactDetails(contact);
+ }
+ 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 dc0f5d3e..6fddb23e 100644
--- a/src/main/res/menu/muc_details_context.xml
+++ b/src/main/res/menu/muc_details_context.xml
@@ -3,30 +3,34 @@
<item
android:id="@+id/start_conversation"
android:title="@string/start_conversation"
- android:visible="false" />
- <item
- android:id="@+id/give_membership"
+ android:visible="false"/>
+ <item
+ android:id="@+id/action_contact_details"
+ android:title="@string/action_contact_details"
+ android:visible="false"/>
+ <item
+ android:id="@+id/give_membership"
android:title="@string/grant_membership"
- android:visible="false" />
- <item
- android:id="@+id/give_admin_privileges"
+ android:visible="false"/>
+ <item
+ android:id="@+id/give_admin_privileges"
android:title="@string/grant_admin_privileges"
- android:visible="false"/>
- <item
- android:id="@+id/remove_admin_privileges"
+ android:visible="false"/>
+ <item
+ android:id="@+id/remove_admin_privileges"
android:title="@string/remove_admin_privileges"
- android:visible="false"/>
+ android:visible="false"/>
- <item
- android:id="@+id/remove_membership"
- android:title="@string/remove_membership"
- android:visible="false"/>
- <item
- android:id="@+id/ban_from_conference"
- android:title="@string/ban_from_conference"
- android:visible="false" />
- <item
- android:id="@+id/remove_from_room"
+ <item
+ android:id="@+id/remove_membership"
+ android:title="@string/remove_membership"
+ android:visible="false"/>
+ <item
+ android:id="@+id/ban_from_conference"
+ android:title="@string/ban_from_conference"
+ android:visible="false"/>
+ <item
+ android:id="@+id/remove_from_room"
android:title="@string/remove_from_room"
- android:visible="false"/>
-</menu> \ No newline at end of file
+ android:visible="false"/>
+</menu>
diff --git a/src/main/res/values-v21/themes.xml b/src/main/res/values-v21/themes.xml
index 9e8775f9..8aa79ac3 100644
--- a/src/main/res/values-v21/themes.xml
+++ b/src/main/res/values-v21/themes.xml
@@ -6,6 +6,9 @@
<item name="android:colorPrimaryDark">@color/green700</item>
<item name="android:colorAccent">@color/accent</item>
+ <item name="android:windowActionModeOverlay">true</item>
+ <item name="android:actionModeBackground">@color/accent</item>
+
<item name="TextSizeInfo">12sp</item>
<item name="TextSizeBody">14sp</item>
<item name="TextSizeHeadline">20sp</item>