From c20f6ef87a55fc027a621817f731e7d7782cd372 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 6897cd1800..bb5cbc7ae3 100644 --- a/src/main/java/com/questhelper/managers/QuestManager.java +++ b/src/main/java/com/questhelper/managers/QuestManager.java @@ -138,7 +138,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 3daddb33ab..330ecd8df4 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())