From 05f2ba4526ba0ac8fbd000ab1511bec9527ca6e2 Mon Sep 17 00:00:00 2001 From: ShikiSuen Date: Wed, 9 Nov 2022 15:24:28 +0800 Subject: [PATCH] UpdateSputnik // Fix a conditioning error in dataDidSet(). (#244) --- .../Sources/UpdateSputnik/UpdateSputnik.swift | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Packages/vChewing_UpdateSputnik/Sources/UpdateSputnik/UpdateSputnik.swift b/Packages/vChewing_UpdateSputnik/Sources/UpdateSputnik/UpdateSputnik.swift index af849f6a..5f8906d2 100644 --- a/Packages/vChewing_UpdateSputnik/Sources/UpdateSputnik/UpdateSputnik.swift +++ b/Packages/vChewing_UpdateSputnik/Sources/UpdateSputnik/UpdateSputnik.swift @@ -105,7 +105,8 @@ public class UpdateSputnik { let intCurrentVersion = Int(dicMainBundle[kCFBundleVersionKey as String] as? String ?? ""), let strCurrentVersionShortened = dicMainBundle["CFBundleShortVersionString"] as? String else { return } // Shouldn't happen. - if intRemoteVersion <= intCurrentVersion, isCurrentCheckForced { + if intRemoteVersion <= intCurrentVersion { + guard isCurrentCheckForced else { return } let alert = NSAlert() alert.messageText = NSLocalizedString("Update Check Completed", comment: "") alert.informativeText = NSLocalizedString("You are already using the latest version.", comment: "")