Skip to content

Commit

Permalink
ui拆分
Browse files Browse the repository at this point in the history
  • Loading branch information
TC999 committed Jan 5, 2025
1 parent 245118c commit 582ed59
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions src/ui.rs
Original file line number Diff line number Diff line change
Expand Up @@ -80,16 +80,7 @@ impl eframe::App for AppDataCleaner {

// 加载描述文件
if self.folder_descriptions.is_none() {
match FolderDescriptions::load_from_yaml("folders_description.yaml") {
Ok(descriptions) => self.folder_descriptions = Some(descriptions),
Err(e) => {
if !self.yaml_error_logged {
eprintln!("加载 YAML 文件失败: {}", e);
logger::log_error(&format!("加载 YAML 文件失败: {}", e));
self.yaml_error_logged = true; // 记录错误,避免重复输出
}
}
}
self.folder_descriptions = load_folder_descriptions("folders_description.yaml", &mut self.yaml_error_logged);
}

if self.is_logging_enabled != self.previous_logging_state {
Expand Down

0 comments on commit 582ed59

Please sign in to comment.