mirror of
https://github.com/redstrate/Astra.git
synced 2025-04-21 20:27:45 +00:00
Only close the auto-login window when login succeeds
This prevents edge cases where the patcher window opens for a second, and then the entire application closes and the game never launches due to the auto-login window closing too early.
This commit is contained in:
parent
fe613f3f52
commit
3e030587c7
1 changed files with 8 additions and 3 deletions
|
@ -27,14 +27,19 @@ AutoLoginWindow::AutoLoginWindow(DesktopInterface& interface, ProfileSettings& p
|
|||
mainLayout->addWidget(cancelButton);
|
||||
|
||||
auto autologinTimer = new QTimer();
|
||||
|
||||
connect(autologinTimer, &QTimer::timeout, [&, this, autologinTimer] {
|
||||
core.autoLogin(profile);
|
||||
|
||||
close();
|
||||
autologinTimer->stop();
|
||||
});
|
||||
|
||||
connect(this, &AutoLoginWindow::loginCanceled, [autologinTimer] {
|
||||
autologinTimer->stop();
|
||||
});
|
||||
|
||||
connect(&core, &LauncherCore::successfulLaunch, [this, autologinTimer] {
|
||||
close();
|
||||
autologinTimer->stop();
|
||||
});
|
||||
|
||||
autologinTimer->start(5000);
|
||||
}
|
Loading…
Add table
Reference in a new issue