Repository navigation
fix(updates): 回退先重挂页面、不可取消、落盘失败不抛 #39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -60,8 +60,9 @@ fun UpdatesPage( | |
| // only the failures that mean the package cannot run here (docs/updates.md §4.5) | ||
| if ((failure.kind == "E2" || failure.kind == "E6") && page.bundle !== updates.embedded(pkg)) { | ||
| LaunchedEffect(failure) { | ||
| updates.rollBack(pkg, page.bundle, page.module.name, failure) | ||
| // remount first: the rollback can wait for a check() downloading under the package lock | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [建议]
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 不改。effect 从进入组合到协程开始执行只隔一次调度,通常不到一帧,用户来不及在这期间离开页面。即使发生,后果也能自己恢复:坏版本没被拉黑,下次打开页面会再报 E2/E6、再走一次回退。要彻底消除这个窗口,就得让 |
||
| bundle = updates.embedded(pkg) | ||
| updates.rollBack(pkg, page.bundle, page.module.name, failure) | ||
| } | ||
| } else { | ||
| error(failure) | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.