Fix friend sorting
This commit is contained in:
parent
54f2c29254
commit
16b187d41a
@ -65,14 +65,14 @@ public class FriendManager extends MiniDbClientPlugin<List<FriendStatus>>
|
||||
JOIN_STAFF
|
||||
}
|
||||
|
||||
private static final int MAX_FRIENDS = 500;
|
||||
private static final int MAX_FRIENDS = 1000;
|
||||
private static final long COOLDOWN = TimeUnit.SECONDS.toMillis(5);
|
||||
private static final Comparator<FriendStatus> FRIEND_SORTER = (o1, o2) ->
|
||||
{
|
||||
// If not mutual
|
||||
if (o1.Status != FriendStatusType.Accepted || o2.Status != FriendStatusType.Accepted)
|
||||
{
|
||||
return o1.Name.compareTo(o2.Name);
|
||||
return o1.Name.compareToIgnoreCase(o2.Name);
|
||||
}
|
||||
|
||||
// Online
|
||||
@ -96,7 +96,7 @@ public class FriendManager extends MiniDbClientPlugin<List<FriendStatus>>
|
||||
}
|
||||
|
||||
// Name
|
||||
return o1.Name.compareTo(o2.Name);
|
||||
return o1.Name.compareToIgnoreCase(o2.Name);
|
||||
};
|
||||
|
||||
public static Comparator<FriendStatus> getFriendSorter()
|
||||
|
@ -116,12 +116,12 @@ public class FriendMainPage extends ShopPageBase<FriendManager, FriendShop>
|
||||
|
||||
slot = 47;
|
||||
|
||||
FriendVisibility playerVisiblity = getPlugin().getVisibility(getPlayer());
|
||||
FriendVisibility playerVisibility = getPlugin().getVisibility(getPlayer());
|
||||
|
||||
for (FriendVisibility visibility : FriendVisibility.values())
|
||||
{
|
||||
addButton(slot, new ItemBuilder(visibility.getItemStack())
|
||||
.setGlow(visibility == playerVisiblity)
|
||||
.setGlow(visibility == playerVisibility)
|
||||
.build(), (player, clickType) ->
|
||||
{
|
||||
getPlugin().setVisibility(player, visibility);
|
||||
|
Loading…
Reference in New Issue
Block a user