Conversation
There was a problem hiding this comment.
Pull request overview
This PR refactors the MessageDialogPane.MessageType enum by moving icon mappings from switch statements into the enum constants themselves, reducing code duplication. The changes eliminate two identical switch statements in MessageDialogPane and HintPane, replacing them with a single getIcon() method on the enum.
Key Changes:
- Enhanced
MessageTypeenum with icon field andgetIcon()method - Removed duplicate switch statements from
MessageDialogPaneandHintPane - Removed unnecessary SVG import from
HintPane
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
MessageDialogPane.java |
Added icon field and getIcon() method to MessageType enum, removed switch statement for icon mapping |
HintPane.java |
Removed duplicate switch statement and SVG import, now uses MessageType.getIcon() |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
HMCL/src/main/java/org/jackhuang/hmcl/ui/construct/MessageDialogPane.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
No description provided.