mirror of
https://github.com/overte-org/overte.git
synced 2025-04-23 03:53:34 +02:00
Merge branch 'fly-login-upon-launch' of https://github.com/sethalves/hifi into loginOnLaunch
This commit is contained in:
commit
581aa0c02d
1 changed files with 13 additions and 0 deletions
|
@ -2299,6 +2299,19 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer, bo
|
|||
connect(&AndroidHelper::instance(), &AndroidHelper::enterForeground, this, &Application::enterForeground);
|
||||
AndroidHelper::instance().notifyLoadComplete();
|
||||
#endif
|
||||
|
||||
static int CHECK_LOGIN_TIMER = 3000;
|
||||
QTimer* checkLoginTimer = new QTimer(this);
|
||||
checkLoginTimer->setInterval(CHECK_LOGIN_TIMER);
|
||||
checkLoginTimer->setSingleShot(true);
|
||||
connect(checkLoginTimer, &QTimer::timeout, this, []() {
|
||||
auto accountManager = DependencyManager::get<AccountManager>();
|
||||
auto dialogsManager = DependencyManager::get<DialogsManager>();
|
||||
if (!accountManager->isLoggedIn()) {
|
||||
dialogsManager->showLoginDialog();
|
||||
}
|
||||
});
|
||||
checkLoginTimer->start();
|
||||
}
|
||||
|
||||
void Application::updateVerboseLogging() {
|
||||
|
|
Loading…
Reference in a new issue