From 94f116553d672ca8a1f01377c87ecda5d433548e Mon Sep 17 00:00:00 2001 From: Raivis Dejus Date: Sat, 28 Feb 2026 10:17:45 +0200 Subject: [PATCH] Cleanup --- buzz/update_checker.py | 8 -------- buzz/widgets/main_window.py | 6 ------ 2 files changed, 14 deletions(-) diff --git a/buzz/update_checker.py b/buzz/update_checker.py index 1e842e09..ff052af4 100644 --- a/buzz/update_checker.py +++ b/buzz/update_checker.py @@ -20,10 +20,6 @@ class UpdateInfo: class UpdateChecker(QObject): update_available = pyqtSignal(object) - no_update_available = pyqtSignal() - - check_failed = pyqtSignal(str) - VERSION_JSON_URL = "https://github.com/chidiwilliams/buzz/releases/latest/download/version_info.json" CHECK_INTERVAL_DAYS = 7 @@ -73,7 +69,6 @@ class UpdateChecker(QObject): def check_for_updates(self) -> None: """Start the network request""" if not self.should_check_for_updates(): - self.no_update_available.emit() return logging.info("Checking for updates...") @@ -92,7 +87,6 @@ class UpdateChecker(QObject): if reply.error() != QNetworkReply.NetworkError.NoError: error_msg = f"Failed to check for updates: {reply.errorString()}" logging.error(error_msg) - self.check_failed.emit(error_msg) reply.deleteLater() return @@ -129,12 +123,10 @@ class UpdateChecker(QObject): Settings.Key.UPDATE_AVAILABLE_VERSION, "" ) - self.no_update_available.emit() except (json.JSONDecodeError, KeyError) as e: error_msg = f"Failed to parse version info: {e}" logging.error(error_msg) - self.check_failed.emit(error_msg) def _get_download_url(self, download_urls: dict) -> list: system = platform.system() diff --git a/buzz/widgets/main_window.py b/buzz/widgets/main_window.py index 30625302..f877321a 100644 --- a/buzz/widgets/main_window.py +++ b/buzz/widgets/main_window.py @@ -507,21 +507,15 @@ class MainWindow(QMainWindow): """Initializes and runs the update checker.""" self.update_checker = UpdateChecker(settings=self.settings, parent=self) self.update_checker.update_available.connect(self._on_update_available) - self.update_checker.check_failed.connect(self._on_update_check_failed) # Check for updates on startup self.update_checker.check_for_updates() def _on_update_available(self, update_info: UpdateInfo): """Called when an update is available.""" - logging.info(f"Update available: {update_info.version}") self._update_info = update_info self.toolbar.set_update_available(True) - def _on_update_check_failed(self, error: str): - """Called when update check fails.""" - logging.warning(f"Update check failed: {error}") - def on_update_action_triggered(self): """Called when user clicks the update action in toolbar.""" if self._update_info is None: