Skip to content

Commit

Permalink
roster: show JID in context menu
Browse files Browse the repository at this point in the history
  • Loading branch information
ge0rg committed Jan 30, 2013
1 parent 23038ac commit 1b135d8
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/org/yaxim/androidclient/MainWindow.java
Expand Up @@ -330,8 +330,16 @@ public void onCreateContextMenu(ContextMenu menu, View v,
getMenuInflater().inflate(R.menu.roster_contextmenu, menu);

// get the entry name for the item
String menuName = getPackedItemRow(packedPosition,
isChild ? RosterConstants.ALIAS : RosterConstants.GROUP);
String menuName;
if (isChild) {
menuName = String.format("%s (%s)",
getPackedItemRow(packedPosition, RosterConstants.ALIAS),
getPackedItemRow(packedPosition, RosterConstants.JID));
} else {
menuName = getPackedItemRow(packedPosition, RosterConstants.GROUP);
if (menuName.equals(""))
menuName = getString(R.string.default_group);
}

// display contact menu for contacts
menu.setGroupVisible(R.id.roster_contextmenu_contact_menu, isChild);
Expand Down

0 comments on commit 1b135d8

Please sign in to comment.