Skip to content

fix: 更新时不保存窗口位置#5819

Open
CiiLu wants to merge 4 commits intoHMCL-dev:mainfrom
CiiLu:updateeeeeeeeeeeeeeeeee
Open

fix: 更新时不保存窗口位置#5819
CiiLu wants to merge 4 commits intoHMCL-dev:mainfrom
CiiLu:updateeeeeeeeeeeeeeeeee

Conversation

@CiiLu
Copy link
Copy Markdown
Contributor

@CiiLu CiiLu commented Mar 21, 2026

No description provided.

Comment thread HMCL/src/main/java/org/jackhuang/hmcl/upgrade/UpdateHandler.java Outdated
Comment thread HMCL/src/main/java/org/jackhuang/hmcl/upgrade/UpdateHandler.java
@Glavo
Copy link
Copy Markdown
Member

Glavo commented Apr 17, 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 modifies the update process in UpdateHandler.java to ensure a clean application shutdown and data persistence before applying updates. It introduces logic to wait for Controllers.onApplicationStop() to execute on the JavaFX thread and calls FileSaver.waitForAllSaves() to prevent data loss. The review feedback correctly identifies a potential hang if onApplicationStop() throws an exception and suggests using a try-finally block to ensure the CompletableFuture always completes.

Comment thread HMCL/src/main/java/org/jackhuang/hmcl/upgrade/UpdateHandler.java
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