fix(menubar): use numeric version comparison for update check

Compare versions with .orderedDescending instead of != to prevent
showing update button when installed version is newer than cached.
This commit is contained in:
iamtoruk 2026-04-19 16:33:52 -07:00
parent 45be10b755
commit 12f0833bef

View file

@ -18,7 +18,8 @@ final class UpdateChecker {
let current = currentVersion
let normalizedLatest = latest.hasPrefix("v") ? String(latest.dropFirst()) : latest
let normalizedCurrent = current.hasPrefix("v") ? String(current.dropFirst()) : current
return !normalizedCurrent.isEmpty && normalizedCurrent != "dev" && normalizedLatest != normalizedCurrent
guard !normalizedCurrent.isEmpty && normalizedCurrent != "dev" else { return false }
return normalizedLatest.compare(normalizedCurrent, options: .numeric) == .orderedDescending
}
var currentVersion: String {