mirror of
https://github.com/HMCL-dev/HMCL.git
synced 2025-09-25 20:21:34 -04:00
[release/3.6] 修复游戏版本列表错误地过滤掉部分版本的问题 (#4424)
https://github.com/HMCL-dev/HMCL/pull/4066 https://github.com/HMCL-dev/HMCL/pull/4244 --------- Co-authored-by: Wulian233 <1055917385@qq.com>
This commit is contained in:
parent
708e0326a7
commit
ff3b486f58
@ -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;
|
||||
@ -53,10 +54,16 @@ public final class GameRemoteVersion extends RemoteVersion {
|
||||
|
||||
@Override
|
||||
public int compareTo(RemoteVersion o) {
|
||||
if (!(o instanceof GameRemoteVersion))
|
||||
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(o.getSelfVersion(), getSelfVersion());
|
||||
}
|
||||
|
||||
private static Type getReleaseType(ReleaseType type) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user