Skip to content

feat: 修改主页下载稳定版功能为在应用内更新#5957

Open
Mine-diamond wants to merge 13 commits intoHMCL-dev:mainfrom
Mine-diamond:switch-stable
Open

feat: 修改主页下载稳定版功能为在应用内更新#5957
Mine-diamond wants to merge 13 commits intoHMCL-dev:mainfrom
Mine-diamond:switch-stable

Conversation

@Mine-diamond
Copy link
Copy Markdown
Contributor

之前主页中预览版提示下载稳定版是打开HMCL官网的下载地址,但是在HMCL内更新应该是更好的选择

bandicam.2026-04-14.22-53-16-847.mp4

@Mine-diamond Mine-diamond marked this pull request as ready for review April 15, 2026 13:57
@Glavo
Copy link
Copy Markdown
Member

Glavo commented Apr 17, 2026

@codex review

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d01199be97

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +378 to +380
RemoteVersion target = UpdateChecker.getLatestVersion();
if (target != null) {
UpdateHandler.updateFrom(target);
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Gate stable upgrade on a successful stable check

This callback upgrades from UpdateChecker.getLatestVersion() as soon as checkingUpdate becomes false, but it does not verify that the just-finished check actually fetched a stable result. Because requestCheckUpdate is skipped when another check is already running and latestVersion is left unchanged when a check fails, clicking this link during an in-flight check (or after a failed stable check) can still install a stale dev/nightly version instead of switching to stable.

Useful? React with 👍 / 👎.


public void onSwitchToStableChannel() {
Controllers.confirm(i18n("update.switch_to_stable.confirm"), i18n("update.switch_to_stable.title"), () -> {
UpdateChecker.requestCheckUpdate(UpdateChannel.STABLE, config().acceptPreviewUpdateProperty().get());
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Request non-preview build when switching to stable

The new “switch to stable” flow passes acceptPreviewUpdate into requestCheckUpdate, so users who enabled preview updates will query stable-preview rather than stable. That conflicts with the UI text promising installation of the latest stable version and can keep users on pre-release builds after choosing this action.

Useful? React with 👍 / 👎.

Comment thread HMCL/src/main/resources/assets/lang/I18N.properties Outdated
Comment thread HMCL/src/main/resources/assets/lang/I18N.properties Outdated
Comment thread HMCL/src/main/resources/assets/lang/I18N.properties Outdated
Comment thread HMCL/src/main/resources/assets/lang/I18N_zh_CN.properties Outdated
Comment thread HMCL/src/main/resources/assets/lang/I18N_zh.properties Outdated
Comment thread HMCL/src/main/resources/assets/lang/I18N_zh.properties Outdated
Comment thread HMCL/src/main/resources/assets/lang/I18N_zh.properties Outdated
Comment thread HMCL/src/main/resources/assets/lang/I18N_zh.properties Outdated
Glavo and others added 9 commits April 26, 2026 20:57
Co-authored-by: 3gf8jv4dv <3gf8jv4dv@gmail.com>
Co-authored-by: 3gf8jv4dv <3gf8jv4dv@gmail.com>
Co-authored-by: 3gf8jv4dv <3gf8jv4dv@gmail.com>
Co-authored-by: 3gf8jv4dv <3gf8jv4dv@gmail.com>
Co-authored-by: 3gf8jv4dv <3gf8jv4dv@gmail.com>
Co-authored-by: 3gf8jv4dv <3gf8jv4dv@gmail.com>
Co-authored-by: 3gf8jv4dv <3gf8jv4dv@gmail.com>
Co-authored-by: 3gf8jv4dv <3gf8jv4dv@gmail.com>
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.

3 participants