From 27361c65fe1bbccc416621c4ef78b3be1491c1fc Mon Sep 17 00:00:00 2001 From: Wulian233 <1055917385@qq.com> Date: Sun, 27 Jul 2025 03:01:39 +0800 Subject: [PATCH] =?UTF-8?q?Fix=20#4063:=20=E4=BF=AE=E5=A4=8D=E6=B8=B8?= =?UTF-8?q?=E6=88=8F=E7=89=88=E6=9C=AC=E5=88=97=E8=A1=A8=E9=94=99=E8=AF=AF?= =?UTF-8?q?=E5=9C=B0=E8=BF=87=E6=BB=A4=E6=8E=89=E9=83=A8=E5=88=86=E7=89=88?= =?UTF-8?q?=E6=9C=AC=E7=9A=84=E9=97=AE=E9=A2=98=20(#4066)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../jackhuang/hmcl/download/game/GameRemoteVersion.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/HMCLCore/src/main/java/org/jackhuang/hmcl/download/game/GameRemoteVersion.java b/HMCLCore/src/main/java/org/jackhuang/hmcl/download/game/GameRemoteVersion.java index 1bdc9913d..7fd4e4a76 100644 --- a/HMCLCore/src/main/java/org/jackhuang/hmcl/download/game/GameRemoteVersion.java +++ b/HMCLCore/src/main/java/org/jackhuang/hmcl/download/game/GameRemoteVersion.java @@ -24,6 +24,7 @@ import org.jackhuang.hmcl.game.ReleaseType; import org.jackhuang.hmcl.game.Version; import org.jackhuang.hmcl.task.Task; import org.jackhuang.hmcl.util.Immutable; +import org.jackhuang.hmcl.util.versioning.GameVersionNumber; import java.time.Instant; import java.util.List; @@ -56,7 +57,12 @@ public final class GameRemoteVersion extends RemoteVersion { if (!(o instanceof GameRemoteVersion)) return 0; - return o.getReleaseDate().compareTo(getReleaseDate()); + int dateCompare = o.getReleaseDate().compareTo(getReleaseDate()); + if (dateCompare != 0) { + return dateCompare; + } + + return GameVersionNumber.compare(getSelfVersion(), o.getSelfVersion()); } private static Type getReleaseType(ReleaseType type) {