Skip to content

Commit

Permalink
Merge pull request runelite#4941 from psikoi/world-hopper-activity-fix
Browse files Browse the repository at this point in the history
World hopper activity ordering improvements
  • Loading branch information
deathbeam authored Aug 18, 2018
2 parents cec942b + 3e9373c commit 1040171
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -123,13 +123,19 @@ void updateList()
case PLAYERS:
return Integer.compare(r1.getUpdatedPlayerCount(), r2.getUpdatedPlayerCount()) * (ascendingOrder ? 1 : -1);
case ACTIVITY:
return r1.getWorld().getActivity().compareTo(r2.getWorld().getActivity()) * (ascendingOrder ? 1 : -1);
return r1.getWorld().getActivity().compareTo(r2.getWorld().getActivity()) * -1 * (ascendingOrder ? 1 : -1);
default:
return 0;

}
});

// Leave empty activity worlds on the bottom of the list
if (orderIndex == WorldOrder.ACTIVITY)
{
rows.sort((r1, r2) -> r1.getWorld().getActivity().equals("-") ? 1 : -1);
}

rows.sort((r1, r2) ->
{
boolean b1 = plugin.isFavorite(r1.getWorld());
Expand Down

0 comments on commit 1040171

Please sign in to comment.