Skip to content

fix: 安装整合包部分任务未正确归类#5922

Merged
Glavo merged 1 commit into
HMCL-dev:mainfrom
CiiLu:m
Apr 6, 2026
Merged

fix: 安装整合包部分任务未正确归类#5922
Glavo merged 1 commit into
HMCL-dev:mainfrom
CiiLu:m

Conversation

@CiiLu
Copy link
Copy Markdown
Contributor

@CiiLu CiiLu commented Apr 6, 2026

image

@Glavo
Copy link
Copy Markdown
Member

Glavo commented Apr 6, 2026

/gemini review

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 updates ModpackHelper.java to replace raw string stage hints with structured Task.StagesHint objects and refines the class imports. A review comment suggests extracting the repeated StagesHint instances into constants to reduce redundancy and improve maintainability.

return new ServerModpackRemoteInstallTask(profile.getDependency(), manifest, name)
.whenComplete(Schedulers.defaultScheduler(), success, failure)
.withStagesHints("hmcl.modpack", "hmcl.modpack.download");
.withStagesHints(new Task.StagesHint("hmcl.modpack"), new Task.StagesHint("hmcl.modpack.download", List.of("hmcl.install.assets", "hmcl.install.libraries")));
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

这里的任务阶段提示(StagesHint)在文件中重复出现了多次(共 5 处,分别在第 173、217、222、226 和 234 行)。建议将这些重复的提示提取为类级别的私有常量(例如 MODPACK_STAGEDOWNLOAD_STAGE),以提高代码的可维护性,减少冗余,并避免未来修改时出现拼写不一致的问题。

@Glavo Glavo merged commit 8e6ac94 into HMCL-dev:main Apr 6, 2026
2 checks passed
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.

2 participants