Make sure we don't override existing display name's with those of the first contact added to a meta contact

cusax-fix
Emil Ivov 20 years ago
parent 3f419c9a0a
commit 71020bd233

@ -287,8 +287,11 @@ void addProtoContact(Contact contact)
this.protoContacts.add(contact);
//if this is our firt contact - set the display name too.
if(this.protoContacts.size() == 1){
//if this is our firt contact and we don't already have a display
//name, use theirs.
if(this.protoContacts.size() == 1
&&( this.displayName == null
|| this.displayName.trim().length() == 0)){
//be careful not to use setDisplayName() here cause this will
//bring us into a deadlock.
this.displayName = new String(contact.getDisplayName().getBytes());

Loading…
Cancel
Save