mirror of
https://github.com/hyb-oyqq/FRAISEMOE-Addons-Installer-NEXT.git
synced 2025-12-20 05:48:35 +00:00
feat(core): 集成补丁检测器以增强补丁管理功能
- 在主窗口中添加补丁检测器,支持补丁的检测和验证。 - 更新补丁管理器以使用补丁检测器进行补丁安装状态检查。 - 优化下载管理器和离线模式管理器,整合补丁检测逻辑,提升用户体验。 - 添加进度窗口以显示下载状态,增强用户反馈。 - 重构相关逻辑以支持新功能,确保代码可维护性和可读性。
This commit is contained in:
@@ -567,14 +567,17 @@ class HostsManager:
|
||||
self.auto_restore_disabled = auto_restore_disabled
|
||||
return auto_restore_disabled
|
||||
|
||||
def check_and_clean_all_entries(self):
|
||||
def check_and_clean_all_entries(self, force_clean=False):
|
||||
"""检查并清理所有由本应用程序添加的hosts记录
|
||||
|
||||
Args:
|
||||
force_clean: 是否强制清理,即使禁用了自动还原
|
||||
|
||||
Returns:
|
||||
bool: 清理是否成功
|
||||
"""
|
||||
# 如果禁用了自动还原,则不执行清理操作
|
||||
if self.is_auto_restore_disabled():
|
||||
# 如果禁用了自动还原,且不是强制清理,则不执行清理操作
|
||||
if self.is_auto_restore_disabled() and not force_clean:
|
||||
logger.info("已禁用自动还原hosts,跳过清理操作")
|
||||
return True
|
||||
|
||||
|
||||
Reference in New Issue
Block a user