Improve communities member page sorter to base on role as well as name and online status

This commit is contained in:
AlexTheCoder 2016-12-22 22:57:16 -05:00 committed by cnr
parent 09e711e202
commit 0a69562579

View File

@ -110,7 +110,18 @@ public class CommunityMembersPage extends CommunitiesGUIPage
{
if (info1.isOnline() == info2.isOnline())
{
return info1.Name.compareToIgnoreCase(info2.Name);
if (info1.Role == info2.Role)
{
return info1.Name.compareToIgnoreCase(info2.Name);
}
else if (info1.Role.ordinal() < info2.Role.ordinal())
{
return -1;
}
else
{
return 1;
}
}
if (info1.isOnline())