From 73c74d339f907b015c8e07307b509e1aa2a4d5bf Mon Sep 17 00:00:00 2001 From: SimplifiedPrivacy Date: Thu, 13 Aug 2026 08:09:38 -0400 Subject: [PATCH] Improved use of connection observers & fixed a bug in compare versions if it was the same version --- core/services/helpers/install_dependencies.py | 7 +++++-- core/utils/basic_operations/compare_versions.py | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/core/services/helpers/install_dependencies.py b/core/services/helpers/install_dependencies.py index 87928b4..6dca585 100644 --- a/core/services/helpers/install_dependencies.py +++ b/core/services/helpers/install_dependencies.py @@ -98,7 +98,8 @@ def setup_singbox_binary( target_file_hash=target_file_hash, target_app_name="sing-box", target_version=target_version, - application_version_observer=application_version_observer + application_version_observer=application_version_observer, + connection_observer=connection_observer ) if not file_result.valid: @@ -254,6 +255,7 @@ def download_and_verify( target_app_name: str, target_version: str, application_version_observer: Optional[ApplicationVersionObserver] = None, + connection_observer: Optional[ConnectionObserver] = None ) -> Result: """ Purpose: @@ -274,7 +276,8 @@ def download_and_verify( download_path=download_path, target_file_hash=target_file_hash, application_version_observer=application_version_observer, - target_app_version=target_version + target_app_version=target_version, + connection_observer=connection_observer ) if not download_result.valid: diff --git a/core/utils/basic_operations/compare_versions.py b/core/utils/basic_operations/compare_versions.py index 0071756..4bf8952 100644 --- a/core/utils/basic_operations/compare_versions.py +++ b/core/utils/basic_operations/compare_versions.py @@ -33,4 +33,4 @@ def version_update_required(new_version: str, version_installed: str) -> bool: return False # step 4) if equal, go into the last digit - return new_patch > installed_patch + return new_patch >= installed_patch