feat: enhance settings dialog and update check logging

This commit is contained in:
2026-05-20 04:06:53 +00:00
parent 4312efc15c
commit 4870f3ee87
2 changed files with 22 additions and 10 deletions
+8 -5
View File
@@ -126,17 +126,17 @@ def check_for_update():
cfg = _read_config()
update_source = str(cfg.get("update_source", "gitea")).strip().lower()
update_url = str(cfg.get("update_url", "")).strip()
except Exception:
except Exception as exc:
_update_log("config read failed in check_for_update: {} — defaulting to gitea".format(exc))
update_source = "gitea"
update_url = ""
if update_source == "disabled":
return None, None
_update_log("Checking for update (source={}, version={})".format(
update_source, _CURRENT_VERSION
))
if update_source == "disabled":
return None, None
if update_source == "url":
return _check_for_update_url(update_url)
else:
@@ -472,8 +472,11 @@ class WatcherTray:
def _icon_updater(self):
"""Periodically refresh the tray icon and check for updates."""
_update_log("Updater thread started (version={}, first check in ~30s)".format(_CURRENT_VERSION))
last_status = None
update_check_counter = 0 # check every ~5 min (30 × 10s ticks)
# Initial first-check fires at counter==3 (~30s) so we get a confirmation
# line in the log soon after startup; subsequent checks every ~5 min.
update_check_counter = 27
while not self.stop_event.is_set():
icon_status = self._tray_status()