1
Fork 0
mirror of https://github.com/redstrate/Astra.git synced 2025-04-23 21:07:45 +00:00

Fix a possible crash when creating an account for the first time

(cherry picked from commit 3a57205217)
This commit is contained in:
Joshua Goins 2024-03-23 10:38:21 -04:00
parent 49150e022c
commit 51c9586aee

View file

@ -48,17 +48,17 @@ Kirigami.ApplicationWindow {
if (!LauncherCore.currentProfile.isGameInstalled) {
// User must set up the profile
pageStack.layers.replace(Qt.createComponent("zone.xiv.astra", "SetupPage"), {
pageStack.layers.push(Qt.createComponent("zone.xiv.astra", "SetupPage"), {
profile: LauncherCore.currentProfile
})
} else if (!LauncherCore.currentProfile.account) {
// User must select an account for the profile
pageStack.layers.replace(Qt.createComponent("zone.xiv.astra", "AccountSetup"), {
pageStack.layers.push(Qt.createComponent("zone.xiv.astra", "AccountSetup"), {
profile: LauncherCore.currentProfile
})
} else {
if (LauncherCore.autoLoginProfile && !checkedAutoLogin) {
pageStack.layers.replace(Qt.createComponent("zone.xiv.astra", "AutoLoginPage"))
pageStack.layers.push(Qt.createComponent("zone.xiv.astra", "AutoLoginPage"))
checkedAutoLogin = true;
} else {
pageStack.layers.replace(Qt.createComponent("zone.xiv.astra", "MainPage"))