feat: show account creation dialog when no account exists at launching game.
This commit is contained in:
@@ -218,6 +218,10 @@ public class RootPage extends DecoratorTabPage {
|
|||||||
if (checkedAccont)
|
if (checkedAccont)
|
||||||
return;
|
return;
|
||||||
checkedAccont = true;
|
checkedAccont = true;
|
||||||
|
checkAccountForcibly();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void checkAccountForcibly() {
|
||||||
if (Accounts.getAccounts().isEmpty())
|
if (Accounts.getAccounts().isEmpty())
|
||||||
Platform.runLater(this::addNewAccount);
|
Platform.runLater(this::addNewAccount);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -215,7 +215,7 @@ public final class Versions {
|
|||||||
|
|
||||||
private static boolean checkForLaunching(Profile profile, String id) {
|
private static boolean checkForLaunching(Profile profile, String id) {
|
||||||
if (Accounts.getSelectedAccount() == null)
|
if (Accounts.getSelectedAccount() == null)
|
||||||
Controllers.getRootPage().checkAccount();
|
Controllers.getRootPage().checkAccountForcibly();
|
||||||
else if (id == null || !profile.getRepository().isLoaded() || !profile.getRepository().hasVersion(id))
|
else if (id == null || !profile.getRepository().isLoaded() || !profile.getRepository().hasVersion(id))
|
||||||
Controllers.dialog(i18n("version.empty.launch"), i18n("launch.failed"), MessageDialogPane.MessageType.ERROR, () -> {
|
Controllers.dialog(i18n("version.empty.launch"), i18n("launch.failed"), MessageDialogPane.MessageType.ERROR, () -> {
|
||||||
Controllers.navigate(Controllers.getGameListPage());
|
Controllers.navigate(Controllers.getGameListPage());
|
||||||
|
|||||||
Reference in New Issue
Block a user