aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java
diff options
context:
space:
mode:
authorChristian Schneppe <christian@pix-art.de>2018-09-14 22:51:15 +0200
committerChristian Schneppe <christian@pix-art.de>2018-09-14 22:51:15 +0200
commite561d869fabad799ed5af5b89532b4500710c958 (patch)
tree594c3bce2e4ce4fff0bd9fa2f080dbed086c02fe /src/main/java
parent43e5ab1701fdd39506d690c11eefc2bac3678914 (diff)
show contact/group details as icons in tablet view
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/de/pixart/messenger/ui/ConversationFragment.java18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/main/java/de/pixart/messenger/ui/ConversationFragment.java b/src/main/java/de/pixart/messenger/ui/ConversationFragment.java
index 0d4610c8e..def4b8a69 100644
--- a/src/main/java/de/pixart/messenger/ui/ConversationFragment.java
+++ b/src/main/java/de/pixart/messenger/ui/ConversationFragment.java
@@ -1207,14 +1207,20 @@ public class ConversationFragment extends XmppFragment implements EditMessage.Ke
final MenuItem menuNeedHelp = menu.findItem(R.id.action_create_issue);
final MenuItem menuSearchUpdates = menu.findItem(R.id.action_check_updates);
final MenuItem menuArchiveChat = menu.findItem(R.id.action_archive_chat);
+ final MenuItem menuGroupDetails = menu.findItem(R.id.action_group_details);
+ final MenuItem menuContactDetails = menu.findItem(R.id.action_contact_details);
if (conversation != null) {
if (conversation.getMode() == Conversation.MODE_MULTI) {
menuInviteContact.setVisible(true);
menuArchiveChat.setTitle(R.string.action_end_conversation_muc);
+ menuGroupDetails.setVisible(true);
+ menuContactDetails.setVisible(false);
} else {
menuInviteContact.setVisible(false);
menuArchiveChat.setTitle(R.string.action_end_conversation);
+ menuGroupDetails.setVisible(false);
+ menuContactDetails.setVisible(true);
}
menuNeedHelp.setVisible(true);
menuSearchUpdates.setVisible(false);
@@ -1223,6 +1229,9 @@ public class ConversationFragment extends XmppFragment implements EditMessage.Ke
} else {
menuNeedHelp.setVisible(false);
menuSearchUpdates.setVisible(true);
+ menuInviteContact.setVisible(false);
+ menuGroupDetails.setVisible(false);
+ menuContactDetails.setVisible(false);
}
super.onCreateOptionsMenu(menu, menuInflater);
}
@@ -1541,6 +1550,15 @@ public class ConversationFragment extends XmppFragment implements EditMessage.Ke
case R.id.action_clear_history:
clearHistoryDialog(conversation);
break;
+ case R.id.action_group_details:
+ Intent intent = new Intent(activity, ConferenceDetailsActivity.class);
+ intent.setAction(ConferenceDetailsActivity.ACTION_VIEW_MUC);
+ intent.putExtra("uuid", conversation.getUuid());
+ startActivity(intent);
+ break;
+ case R.id.action_contact_details:
+ activity.switchToContactDetails(conversation.getContact());
+ break;
case R.id.action_block:
case R.id.action_unblock:
final Activity activity = getActivity();