diff --git a/res/layout/chat.xml b/res/layout/chat.xml index e1ce25994..e19254454 100644 --- a/res/layout/chat.xml +++ b/res/layout/chat.xml @@ -21,15 +21,31 @@ android:layout_weight="0.2" android:padding="18dp"/> - + + + + + + + (); if (mChatRoom.canHandleParticipants()) { + int index = 0; + StringBuilder participantsLabel = new StringBuilder(); for (Participant p : mChatRoom.getParticipants()) { LinphoneContact c = ContactsManager.getInstance().findContactFromAddress(p.getAddress()); if (c != null) { mParticipants.add(c); + participantsLabel.append(c.getFullName()); + } else { + String displayName = p.getAddress().getDisplayName(); + if (displayName != null && !displayName.isEmpty()) { + participantsLabel.append(displayName); + } else { + participantsLabel.append(p.getAddress().getUsername()); + } } + index++; + if (index != mChatRoom.getNbParticipants()) participantsLabel.append(";"); } } else { LinphoneContact c = ContactsManager.getInstance().findContactFromAddress(mRemoteSipAddress); @@ -282,9 +295,12 @@ public class GroupChatFragment extends Fragment implements ChatRoomListener, Con mCallButton.setVisibility(View.GONE); mGroupInfosButton.setVisibility(View.VISIBLE); mRoomLabel.setText(mChatRoom.getSubject()); + mParticipantsLabel.setVisibility(View.VISIBLE); + } else { mCallButton.setVisibility(View.VISIBLE); mGroupInfosButton.setVisibility(View.GONE); + mParticipantsLabel.setVisibility(View.GONE); if (mParticipants.size() == 0) { // Contact not found