diff --git a/HMCL/src/main/java/org/jackhuang/hmcl/ui/main/RootPage.java b/HMCL/src/main/java/org/jackhuang/hmcl/ui/main/RootPage.java index 37c37568e..2b0e09501 100644 --- a/HMCL/src/main/java/org/jackhuang/hmcl/ui/main/RootPage.java +++ b/HMCL/src/main/java/org/jackhuang/hmcl/ui/main/RootPage.java @@ -218,6 +218,10 @@ public class RootPage extends DecoratorTabPage { if (checkedAccont) return; checkedAccont = true; + checkAccountForcibly(); + } + + public void checkAccountForcibly() { if (Accounts.getAccounts().isEmpty()) Platform.runLater(this::addNewAccount); } diff --git a/HMCL/src/main/java/org/jackhuang/hmcl/ui/versions/Versions.java b/HMCL/src/main/java/org/jackhuang/hmcl/ui/versions/Versions.java index 9631833f0..55812f1f4 100644 --- a/HMCL/src/main/java/org/jackhuang/hmcl/ui/versions/Versions.java +++ b/HMCL/src/main/java/org/jackhuang/hmcl/ui/versions/Versions.java @@ -215,7 +215,7 @@ public final class Versions { private static boolean checkForLaunching(Profile profile, String id) { if (Accounts.getSelectedAccount() == null) - Controllers.getRootPage().checkAccount(); + Controllers.getRootPage().checkAccountForcibly(); else if (id == null || !profile.getRepository().isLoaded() || !profile.getRepository().hasVersion(id)) Controllers.dialog(i18n("version.empty.launch"), i18n("launch.failed"), MessageDialogPane.MessageType.ERROR, () -> { Controllers.navigate(Controllers.getGameListPage());