feat(core): 优化主窗口信号连接和状态管理

- 更新主窗口信号连接,使用私有方法处理关闭和最小化按钮点击事件,增强代码可读性。
- 根据离线模式和配置状态统一管理开始安装按钮的状态,简化逻辑。
- 增强日志记录,确保在用户操作时提供详细的调试信息,便于后续排查和用户反馈。
- 优化卸载处理程序的日志记录,提升用户体验和系统稳定性。
This commit is contained in:
hyb-oyqq
2025-08-12 18:02:10 +08:00
parent 4f2217ca95
commit a97cdf4c23
7 changed files with 135 additions and 122 deletions

View File

@@ -794,7 +794,6 @@ class DownloadManager:
logger.info(f"DEBUG: 成功复制并验证补丁文件 {_7z_path}")
# 直接进入解压阶段
self.extraction_handler.start_extraction(_7z_path, game_folder, plugin_path, game_version)
self.main_window.extraction_handler.extraction_finished.connect(self.on_extraction_finished)
else:
if debug_mode:
logger.warning(f"DEBUG: 补丁文件哈希验证失败")
@@ -910,7 +909,6 @@ class DownloadManager:
# 直接进入解压阶段
self.extraction_handler.start_extraction(_7z_path, game_folder, plugin_path, game_version)
self.main_window.extraction_handler.extraction_finished.connect(self.on_extraction_finished)
def on_extraction_finished(self, continue_download):
"""解压完成后的回调,决定是否继续下载队列