From 7033e4632ab06938e56f94c2fe57972e38d487e9 Mon Sep 17 00:00:00 2001 From: psikoi Date: Thu, 16 Aug 2018 16:57:59 +0100 Subject: [PATCH] Add activity priority to world list Adds a special sorting case for empty worlds. They should remain at the bottom of the world list. --- .../client/plugins/worldhopper/WorldSwitcherPanel.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/worldhopper/WorldSwitcherPanel.java b/runelite-client/src/main/java/net/runelite/client/plugins/worldhopper/WorldSwitcherPanel.java index f8e9491056..b90aefa6a6 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/worldhopper/WorldSwitcherPanel.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/worldhopper/WorldSwitcherPanel.java @@ -130,6 +130,12 @@ class WorldSwitcherPanel extends PluginPanel } }); + // 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());