sort muc users by affiliation, name. fixes #1913
This commit is contained in:
parent
95a51ea2e0
commit
f9600b950f
|
@ -296,6 +296,11 @@ public class MucOptions {
|
|||
|
||||
@Override
|
||||
public int compareTo(User another) {
|
||||
if (another.getAffiliation().outranks(getAffiliation())) {
|
||||
return 1;
|
||||
} else if (getAffiliation().outranks(another.getAffiliation())) {
|
||||
return -1;
|
||||
} else {
|
||||
Contact ourContact = getContact();
|
||||
Contact anotherContact = another.getContact();
|
||||
if (ourContact != null && anotherContact != null) {
|
||||
|
@ -308,6 +313,7 @@ public class MucOptions {
|
|||
return getName().compareToIgnoreCase(another.getName());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public Jid getRealJid() {
|
||||
return realJid;
|
||||
|
|
Loading…
Reference in New Issue