From b023b9faf7ecb6a41b5f481fdfae3b0e245f87d3 Mon Sep 17 00:00:00 2001 From: SimplifiedPrivacy Date: Wed, 12 Aug 2026 14:18:48 -0400 Subject: [PATCH] GUI's observers now do strings to be more neutral to what object type is being downloaded (application_version objects vs dependency) --- gui/v2/infrastructure/setup_observers.py | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/gui/v2/infrastructure/setup_observers.py b/gui/v2/infrastructure/setup_observers.py index 41ab3d8..be58587 100755 --- a/gui/v2/infrastructure/setup_observers.py +++ b/gui/v2/infrastructure/setup_observers.py @@ -4,7 +4,7 @@ from core.observers.ConnectionObserver import ConnectionObserver from core.observers.InvoiceObserver import InvoiceObserver from core.observers.ProfileObserver import ProfileObserver from core.observers.TicketObserver import TicketObserver -from core.controllers.ApplicationController import ApplicationController +# from core.controllers.ApplicationController import ApplicationController from essentials.models.Event import Event application_version_observer = ApplicationVersionObserver() @@ -41,12 +41,21 @@ def setup_observers(update_status): 'custom_message', lambda event: update_status(f'{event.subject if event.subject else "Error, check logs"}')) application_version_observer.subscribe('downloading', lambda event: update_status( - f'Downloading {ApplicationController.get(event.subject.application_code).name}')) + f'{event.subject if event.subject else "Downloading.."}')) + application_version_observer.subscribe('download_progressing', lambda event: update_status( - f'Downloading {ApplicationController.get(event.subject.application_code).name} {event.meta.get('progress'):.2f}%')) + f'{event.subject if event.subject else "Downloading.."}')) application_version_observer.subscribe('downloaded', lambda event: update_status( - f'Downloaded {ApplicationController.get(event.subject.application_code).name}')) + f'{event.subject if event.subject else "Downloaded"}')) + + # application_version_observer.subscribe('downloading', lambda event: update_status( + # f'Downloading {ApplicationController.get(event.subject.application_code).name}')) + # application_version_observer.subscribe('download_progressing', lambda event: update_status( + # f'Downloading {ApplicationController.get(event.subject.application_code).name} {event.meta.get('progress'):.2f}%')) + + # application_version_observer.subscribe('downloaded', lambda event: update_status( + # f'Downloaded {ApplicationController.get(event.subject.application_code).name}')) connection_observer.subscribe('connecting', lambda event: update_status( f'[{event.subject.get("attempt_count")}/{event.subject.get("maximum_number_of_attempts")}] Performing connection attempt...'))