From cf84f138f63abc3aff9d89b7bf8f6a3216119e16 Mon Sep 17 00:00:00 2001 From: "dries.k" Date: Tue, 1 Feb 2022 21:01:31 +0100 Subject: [PATCH] move watchdog callback --- gotify_tray/gui/MainApplication.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/gotify_tray/gui/MainApplication.py b/gotify_tray/gui/MainApplication.py index caa03bb..8773be3 100644 --- a/gotify_tray/gui/MainApplication.py +++ b/gotify_tray/gui/MainApplication.py @@ -72,11 +72,11 @@ class MainApplication(QtWidgets.QApplication): ) self.watchdog = ServerConnectionWatchdogTask(self.gotify_client) - self.watchdog.closed.connect(lambda: self.listener_closed_callback(None, None)) - self.watchdog.start() self.link_callbacks() + self.watchdog.start() + def refresh_applications(self): self.application_model.clear() @@ -164,6 +164,8 @@ class MainApplication(QtWidgets.QApplication): self.tray.actionSettings.triggered.connect(self.settings_callback) self.tray.actionReconnect.triggered.connect(self.refresh_callback) + self.watchdog.closed.connect(lambda: self.listener_closed_callback(None, None)) + def acquire_lock(self) -> bool: temp_dir = tempfile.gettempdir() lock_filename = os.path.join(