From 78ff79ec696d795639b661a61882858d9a57fa21 Mon Sep 17 00:00:00 2001 From: Rasmus Karlsson Date: Sun, 24 Nov 2024 14:44:00 +0100 Subject: [PATCH] refactor: rename `updateSteps` to `updateStepsTexts` just thought this clarifies a bit that the function only tries to update the texts of the steps in the sidepanel, not any other logic --- src/main/java/com/questhelper/managers/QuestManager.java | 2 +- src/main/java/com/questhelper/panel/QuestHelperPanel.java | 4 ++-- src/main/java/com/questhelper/panel/QuestOverviewPanel.java | 3 +-- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/main/java/com/questhelper/managers/QuestManager.java b/src/main/java/com/questhelper/managers/QuestManager.java index cdb2e4a103..5b28ecc880 100644 --- a/src/main/java/com/questhelper/managers/QuestManager.java +++ b/src/main/java/com/questhelper/managers/QuestManager.java @@ -156,7 +156,7 @@ private void handleSelectedQuest() { if (selectedQuest.getCurrentStep() != null) { - panel.updateSteps(); + panel.updateStepsTexts(); QuestStep currentStep = selectedQuest.getCurrentStep().getSidePanelStep(); if (currentStep != null && currentStep != lastStep && panel.questActive) { diff --git a/src/main/java/com/questhelper/panel/QuestHelperPanel.java b/src/main/java/com/questhelper/panel/QuestHelperPanel.java index 69733eea6a..8f03d014e0 100644 --- a/src/main/java/com/questhelper/panel/QuestHelperPanel.java +++ b/src/main/java/com/questhelper/panel/QuestHelperPanel.java @@ -583,9 +583,9 @@ public void addQuest(QuestHelper quest, boolean isActive) revalidate(); } - public void updateSteps() + public void updateStepsTexts() { - questOverviewPanel.updateSteps(); + questOverviewPanel.updateStepsTexts(); } public void updateHighlight(Client client, QuestStep newStep) diff --git a/src/main/java/com/questhelper/panel/QuestOverviewPanel.java b/src/main/java/com/questhelper/panel/QuestOverviewPanel.java index f88ff74000..a23a771c2c 100644 --- a/src/main/java/com/questhelper/panel/QuestOverviewPanel.java +++ b/src/main/java/com/questhelper/panel/QuestOverviewPanel.java @@ -47,7 +47,6 @@ import com.questhelper.util.Fonts; import lombok.Getter; import net.runelite.api.Client; -import net.runelite.api.Item; import net.runelite.api.Skill; import net.runelite.client.ui.ColorScheme; import static net.runelite.client.ui.PluginPanel.PANEL_WIDTH; @@ -316,7 +315,7 @@ public void mouseClicked(MouseEvent e) } } - public void updateSteps() + public void updateStepsTexts() { questStepPanelList.forEach(panel -> { for (QuestStep step : panel.getSteps())