Conversation
There was a problem hiding this comment.
Pull request overview
This PR optimizes the TwoLineListItem component by implementing lazy initialization for subtitle and tags properties, reducing memory footprint and improving performance for components that don't use all features.
Changes:
- Refactored property management to use lazy initialization pattern with
StringPropertyBase - Updated CSS selectors to reflect new tag container structure
- Simplified component initialization by deferring creation of UI elements until needed
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| HMCL/src/main/java/org/jackhuang/hmcl/ui/construct/TwoLineListItem.java | Implemented lazy initialization for subtitle and tags properties; removed dependency on AggregatedObservableList; streamlined property management using StringPropertyBase pattern |
| HMCL/src/main/resources/assets/css/root.css | Updated CSS selectors to match new tag container structure (tags are now wrapped in a .tags HBox) |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| return lblTitle; | ||
| private ObservableList<Label> tags; | ||
|
|
||
| public ObservableList<Label> getTags() { |
There was a problem hiding this comment.
getTags exposes the internal representation stored in field tags. The value may be modified after this call to getTags.
getTags exposes the internal representation stored in field tags. The value may be modified after this call to getTags.
getTags exposes the internal representation stored in field tags. The value may be modified after this call to getTags.
getTags exposes the internal representation stored in field tags. The value may be modified after this call to getTags.
getTags exposes the internal representation stored in field tags. The value may be modified after this call to getTags.
getTags exposes the internal representation stored in field tags. The value may be modified after this call to getTags.
getTags exposes the internal representation stored in field tags. The value may be modified after this call to getTags.
No description provided.