Fixed display issue for security events
This commit is contained in:
parent
75a4e113d1
commit
d29c6e9740
3 changed files with 12 additions and 5 deletions
|
@ -364,7 +364,10 @@ public class ChatMessagesAdapter extends SelectableAdapter<ChatMessageViewHolder
|
|||
holder.eventLayout.setBackgroundResource(R.drawable.event_decoration_gray);
|
||||
|
||||
Address address = event.getParticipantAddress();
|
||||
String displayName = null;
|
||||
if (address == null && event.getType() == EventLog.Type.ConferenceSecurityEvent) {
|
||||
address = event.getSecurityEventFaultyDeviceAddress();
|
||||
}
|
||||
String displayName = "";
|
||||
if (address != null) {
|
||||
LinphoneContact contact = ContactsManager.getInstance().findContactFromAddress(address);
|
||||
if (contact != null) {
|
||||
|
|
|
@ -162,10 +162,14 @@ public class ChatRoomViewHolder extends RecyclerView.ViewHolder implements View.
|
|||
ContactAvatar.displayAvatar(contact, avatarLayout);
|
||||
}
|
||||
} else {
|
||||
Address remoteAddr;
|
||||
Address remoteAddr = null;
|
||||
if (mRoom.hasCapability(ChatRoomCapabilities.Encrypted.toInt())) {
|
||||
Participant[] participants = mRoom.getParticipants();
|
||||
remoteAddr = participants[0].getAddress();
|
||||
if (participants.length > 0) {
|
||||
remoteAddr = participants[0].getAddress();
|
||||
} else {
|
||||
//TODO: error
|
||||
}
|
||||
} else {
|
||||
remoteAddr = mRoom.getPeerAddress();
|
||||
}
|
||||
|
|
|
@ -2,6 +2,6 @@
|
|||
<shape
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="line">
|
||||
<stroke android:width="50dp" android:color="@color/colorI"/>
|
||||
<size android:height="1dp" />
|
||||
<stroke android:width="1dp" android:color="@color/colorI"/>
|
||||
<size android:height="1dp" android:width="50dp" />
|
||||
</shape>
|
Loading…
Reference in a new issue