Skip to content

Commit 5f052a1

Browse files
fix: reload sidepanel when taskman config changed
Without checking the group the panel also gets reloaded when the configuration of a different plugin gets changed.
1 parent f59b243 commit 5f052a1

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

src/main/java/com/westerhoud/osrs/taskman/TaskmanPlugin.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@
2626
@Slf4j
2727
@PluginDescriptor(name = "Taskman")
2828
public class TaskmanPlugin extends Plugin {
29+
30+
public static final String TASKMAN_CONFIG_GROUP = "taskman";
2931
@Inject private Client client;
3032
@Inject private ClientToolbar clientToolbar;
3133
@Inject private TaskmanConfig config;
@@ -91,7 +93,9 @@ private AccountCredentials getCredentials() {
9193

9294
@Subscribe
9395
public void onConfigChanged(final ConfigChanged configChanged) {
94-
SwingUtilities.invokeLater(() -> sidePanel.reset());
96+
if (configChanged.getGroup().equals(TASKMAN_CONFIG_GROUP)) {
97+
SwingUtilities.invokeLater(() -> sidePanel.reset());
98+
}
9599
}
96100

97101
@Provides

0 commit comments

Comments
 (0)