From f922e9415ce41f452e84df2fb95c9dab507db64b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C5=ABdolfs=20O=C5=A1i=C5=86=C5=A1?= Date: Wed, 10 Jun 2026 16:03:38 +0200 Subject: [PATCH] Show "Up to date" only after a successful check MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The settings footer showed "Up to date" whenever no new version was known — including when the update checker was disabled or the version fetch had silently failed. Derive an explicit upToDate state that is only true when a check succeeded and found no newer version, so a failed or disabled check no longer claims the app is current. --- src/lib/updateChecker.svelte.ts | 18 ++++++++++++++++++ src/modals/Settings.svelte | 2 +- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/src/lib/updateChecker.svelte.ts b/src/lib/updateChecker.svelte.ts index b59d21ba1..fe60fc3e7 100644 --- a/src/lib/updateChecker.svelte.ts +++ b/src/lib/updateChecker.svelte.ts @@ -41,6 +41,24 @@ class UpdateChecker { } }); + // True only when a version check has succeeded and found no newer + // version. Stays false when the checker is disabled or the check failed, + // so the UI doesn't claim "up to date" without evidence. + public upToDate = $derived.by(() => { + if ( + this.isEnabled && + this.latestVersionInfo && + this.sanitizedCurrentVersion + ) { + return !semver.gt( + this.latestVersionInfo.version, + this.sanitizedCurrentVersion, + ); + } else { + return false; + } + }); + // A state that holds the `LatestVersionInfo` if this feature has // been enabled and if there is a newer version available. public newVersion = $derived.by(() => { diff --git a/src/modals/Settings.svelte b/src/modals/Settings.svelte index 00c927366..f1a7b69d9 100644 --- a/src/modals/Settings.svelte +++ b/src/modals/Settings.svelte @@ -140,7 +140,7 @@ · Update to {updateChecker.newVersion} - {:else} + {:else if updateChecker.upToDate} · Up to date {/if} {/if}