Fix update suppression

The check got lost in the recent refactor.

https://forums.ankiweb.net/t/bug-report-anki-23-10-1-linux-flatpak-ignore-this-update-does-not-work/39408
This commit is contained in:
Damien Elmes 2024-01-09 14:09:24 +10:00
parent bf06020855
commit cf5f716037

View file

@ -44,7 +44,8 @@ def check_for_update() -> None:
mw.pm.meta["lastMsg"] = resp.last_message_id mw.pm.meta["lastMsg"] = resp.last_message_id
# has Anki been updated? # has Anki been updated?
if ver := resp.new_version: if ver := resp.new_version:
prompt_to_update(mw, ver) if mw.pm.meta.get("suppressUpdate", None) != ver:
prompt_to_update(mw, ver)
def on_fail(exc: Exception) -> None: def on_fail(exc: Exception) -> None:
print(f"update check failed: {exc}") print(f"update check failed: {exc}")