From 2d19aa749c57c4df984743caf16011c44c6c48a6 Mon Sep 17 00:00:00 2001 From: SecretX33 <4389757+SecretX33@users.noreply.github.com> Date: Sat, 27 Dec 2025 11:17:49 -0300 Subject: [PATCH] Display a dialog box message saying that there's no update when manually checking --- ftl/qt/qt-misc.ftl | 1 + qt/aqt/main.py | 2 +- qt/aqt/update.py | 9 +++++++-- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/ftl/qt/qt-misc.ftl b/ftl/qt/qt-misc.ftl index d7bbef990..5dbbd787c 100644 --- a/ftl/qt/qt-misc.ftl +++ b/ftl/qt/qt-misc.ftl @@ -3,6 +3,7 @@ qt-misc-addons = Add-ons qt-misc-all-cards-notes-and-media-for = All cards, notes, and media for this profile will be deleted. Are you sure? qt-misc-all-cards-notes-and-media-for2 = All cards, notes, and media for the profile "{ $name }" will be deleted. Are you sure? qt-misc-anki-updatedanki-has-been-released =

Anki Updated

Anki { $val } has been released.

+qt-misc-no-update-available = You're up to date!

Anki { $val } is currently the newest version available. qt-misc-automatic-syncing-and-backups-have-been = Backup successfully restored. Automatic syncing and backups have been disabled for now. To enable them again, close the profile or restart Anki. qt-misc-back-side-only = Back Side Only qt-misc-backing-up = Backing Up... diff --git a/qt/aqt/main.py b/qt/aqt/main.py index 873935fc4..df7566242 100644 --- a/qt/aqt/main.py +++ b/qt/aqt/main.py @@ -1335,7 +1335,7 @@ title="{}" {}>{}""".format( def onCheckForUpdates(self) -> None: from aqt.update import check_for_update - check_for_update() + check_for_update(notify_if_no_update=True) # legacy diff --git a/qt/aqt/update.py b/qt/aqt/update.py index e5794eead..f70d8aea3 100644 --- a/qt/aqt/update.py +++ b/qt/aqt/update.py @@ -15,10 +15,10 @@ from aqt.package import ( update_and_restart as _update_and_restart, ) from aqt.qt import * -from aqt.utils import openLink, show_warning, showText, tr +from aqt.utils import openLink, show_info, show_warning, showText, tr -def check_for_update() -> None: +def check_for_update(notify_if_no_update: bool = False) -> None: from aqt import mw def do_check(_col: Collection) -> CheckForUpdateResponse: @@ -54,6 +54,11 @@ def check_for_update() -> None: if ver := resp.new_version: if mw.pm.meta.get("suppressUpdate", None) != ver: prompt_to_update(mw, ver) + elif notify_if_no_update: + show_info( + tr.qt_misc_no_update_available(val=aqt.appVersion), + textFormat=Qt.TextFormat.RichText, + ) def on_fail(exc: Exception) -> None: print(f"update check failed: {exc}")