simplified muc users ordering
This commit is contained in:
parent
ac8aa63916
commit
cdee91363c
|
@ -301,17 +301,18 @@ public class MucOptions {
|
||||||
} else if (getAffiliation().outranks(another.getAffiliation())) {
|
} else if (getAffiliation().outranks(another.getAffiliation())) {
|
||||||
return -1;
|
return -1;
|
||||||
} else {
|
} else {
|
||||||
Contact ourContact = getContact();
|
return getComparableName().compareToIgnoreCase(another.getComparableName());
|
||||||
Contact anotherContact = another.getContact();
|
}
|
||||||
if (ourContact != null && anotherContact != null) {
|
}
|
||||||
return ourContact.compareTo(anotherContact);
|
|
||||||
} else if (ourContact == null && anotherContact != null) {
|
|
||||||
return getName().compareToIgnoreCase(anotherContact.getDisplayName());
|
private String getComparableName() {
|
||||||
} else if (ourContact != null) {
|
Contact contact = getContact();
|
||||||
return ourContact.getDisplayName().compareToIgnoreCase(another.getName());
|
if (contact != null) {
|
||||||
} else {
|
return contact.getDisplayName();
|
||||||
return getName().compareToIgnoreCase(another.getName());
|
} else {
|
||||||
}
|
String name = getName();
|
||||||
|
return name == null ? "" : name;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue