修复 pending 类型的游戏版本被错误识别为愚人节版的问题 (#4273)

This commit is contained in:
Glavo 2025-08-16 16:08:58 +08:00 committed by GitHub
parent 13a2777c87
commit 7035767828
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -189,8 +189,9 @@ public final class VersionsPage extends Control implements WizardPage, Refreshab
}
if (remoteVersion instanceof GameRemoteVersion) {
RemoteVersion.Type versionType = remoteVersion.getVersionType();
String wikiSuffix = getWikiUrlSuffix(remoteVersion.getGameVersion());
switch (remoteVersion.getVersionType()) {
switch (versionType) {
case RELEASE:
content.getTags().setAll(i18n("version.game.release"));
content.setImage(VersionIconType.GRASS.getIcon());
@ -198,7 +199,8 @@ public final class VersionsPage extends Control implements WizardPage, Refreshab
break;
case PENDING:
case SNAPSHOT:
if (GameVersionNumber.asGameVersion(remoteVersion.getGameVersion()).isSpecial()) {
if (versionType == RemoteVersion.Type.SNAPSHOT
&& GameVersionNumber.asGameVersion(remoteVersion.getGameVersion()).isSpecial()) {
content.getTags().setAll(i18n("version.game.april_fools"));
content.setImage(VersionIconType.APRIL_FOOLS.getIcon());
} else {