Fix the problem that you cannot continue after canceling the prompt

This commit is contained in:
Glavo 2021-12-11 13:14:48 +08:00 committed by Yuhui Huang
parent 49378061bf
commit b6ea4c7003

View File

@ -499,7 +499,7 @@ public final class LauncherHelper {
// Cannot allocate too much memory exceeding free space.
if (!suggested && OperatingSystem.TOTAL_MEMORY > 0 && OperatingSystem.TOTAL_MEMORY < setting.getMaxMemory()) {
Controllers.confirm(i18n("launch.advice.not_enough_space", OperatingSystem.TOTAL_MEMORY), i18n("message.error"), continueAction, null);
Controllers.confirm(i18n("launch.advice.not_enough_space", OperatingSystem.TOTAL_MEMORY), i18n("message.error"), continueAction, breakAction);
suggested = true;
}
@ -511,7 +511,7 @@ public final class LauncherHelper {
VersionNumber.VERSION_COMPARATOR.compare(it.getVersion(), "1.12.2-14.23.5.2773") < 0);
boolean hasLiteLoader = version.getLibraries().stream().anyMatch(it -> it.is("com.mumfrey", "liteloader"));
if (hasForge2760 && hasLiteLoader && gameVersion.compareTo(VersionNumber.asVersion("1.12.2")) == 0) {
Controllers.confirm(i18n("launch.advice.forge2760_liteloader"), i18n("message.error"), continueAction, null);
Controllers.confirm(i18n("launch.advice.forge2760_liteloader"), i18n("message.error"), continueAction, breakAction);
suggested = true;
}
}
@ -536,11 +536,13 @@ public final class LauncherHelper {
.orElse("");
if (gameVersion.compareTo(VersionNumber.asVersion("1.12")) < 0) {
if (UNSAFE_CLIENT_1_7_XML_SHA1.contains(xmlSha1)) {
Controllers.confirm(i18n("launch.advice.log4j_cve_2021_44228"), i18n("message.warning"), continueAction, null);
Controllers.confirm(i18n("launch.advice.log4j_cve_2021_44228"), i18n("message.warning"), continueAction, breakAction);
suggested = true;
}
} else {
if (UNSAFE_CLIENT_1_12_XML_SHA1.contains(xmlSha1)) {
Controllers.confirm(i18n("launch.advice.log4j_cve_2021_44228"), i18n("message.warning"), continueAction, null);
Controllers.confirm(i18n("launch.advice.log4j_cve_2021_44228"), i18n("message.warning"), continueAction, breakAction);
suggested = true;
}
}
}