Skip to content

fix(#6154): layout race in instance download page#6155

Open
SALTWOOD wants to merge 4 commits into
HMCL-dev:mainfrom
SALTWOOD:fix/6154
Open

fix(#6154): layout race in instance download page#6155
SALTWOOD wants to merge 4 commits into
HMCL-dev:mainfrom
SALTWOOD:fix/6154

Conversation

@SALTWOOD
Copy link
Copy Markdown

@SALTWOOD SALTWOOD commented May 31, 2026

Fix #6154

这边怀疑是 race condition 导致没能成功设置标签的 Height 属性,所以选择了一个不大不小的值放在上面,暂时解决了问题。如果可能的话,我会尝试寻找更好的方法修好

需要更多测试。该修改之后,我已无法再复现此问题,但是不排除测试姿势不对导致的复现失败。

@SALTWOOD SALTWOOD marked this pull request as ready for review May 31, 2026 12:47
@Glavo
Copy link
Copy Markdown
Member

Glavo commented Jun 1, 2026

/gemini review

@SALTWOOD SALTWOOD changed the title fix(#6154): fix by replacing NaN with a placeholder value fix(#6154): layout race in instance download page Jun 1, 2026
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request simplifies the layout of TwoLineListItem by removing the ScrollPane wrapper around tagsBox and placing tagsBox directly into firstLine. It also binds the managed and visible properties of tagsBox to the presence of tags. A review comment suggests extracting the duplicate Bindings.isNotEmpty(tags) call into a local variable to avoid creating multiple binding instances and duplicate listeners, which helps reduce memory overhead and GC pressure.

Comment thread HMCL/src/main/java/org/jackhuang/hmcl/ui/construct/TwoLineListItem.java Outdated
…Item.java

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
@Glavo
Copy link
Copy Markdown
Member

Glavo commented Jun 1, 2026

image

tag 多的时候又会全部被挤压成 ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] 在版本滚动时修改版本类型筛选器部分版本的 Tag 显示可能消失

2 participants