修复版本列表排序错误的问题 (#4244)

This commit is contained in:
Wulian233
2025-08-11 20:57:05 +08:00
committed by GitHub
parent ba58905c9c
commit d1e006ed29

View File

@@ -54,15 +54,16 @@ public final class GameRemoteVersion extends RemoteVersion {
@Override @Override
public int compareTo(RemoteVersion o) { public int compareTo(RemoteVersion o) {
if (!(o instanceof GameRemoteVersion)) if (!(o instanceof GameRemoteVersion)) {
return 0; return 0;
}
int dateCompare = o.getReleaseDate().compareTo(getReleaseDate()); int dateCompare = o.getReleaseDate().compareTo(getReleaseDate());
if (dateCompare != 0) { if (dateCompare != 0) {
return dateCompare; return dateCompare;
} }
return GameVersionNumber.compare(getSelfVersion(), o.getSelfVersion()); return GameVersionNumber.compare(o.getSelfVersion(), getSelfVersion());
} }
private static Type getReleaseType(ReleaseType type) { private static Type getReleaseType(ReleaseType type) {