refactor: streamline error handling and resource management in various modules

This commit is contained in:
Tunglies
2025-11-06 10:19:06 +08:00
parent 671ac2ebed
commit 69a706b438
13 changed files with 66 additions and 50 deletions
+1 -3
View File
@@ -54,9 +54,7 @@ fn get_ui_ready_notify() -> &'static Arc<Notify> {
// 更新UI准备阶段
pub fn update_ui_ready_stage(stage: UiReadyStage) {
let state = get_ui_ready_state();
let mut stage_lock = state.stage.write();
*stage_lock = stage;
*state.stage.write() = stage;
// 如果是最终阶段,标记UI完全就绪
if stage == UiReadyStage::Ready {
mark_ui_ready();