fix: prevent auth dialog jankiness on start
This commit is contained in:
+8
-3
@@ -19,10 +19,15 @@ MainWindow::MainWindow(QWidget *parent)
|
|||||||
ui = new Ui::MainWindow;
|
ui = new Ui::MainWindow;
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
|
|
||||||
// Show auth dialog initially (user sees this while init() checks for session)
|
|
||||||
m_authDialog->setModal(true);
|
m_authDialog->setModal(true);
|
||||||
m_authDialog->reset();
|
|
||||||
m_authDialog->show();
|
QTimer::singleShot(3000, this, [this]() {
|
||||||
|
if (!m_authManager->isSignedIn())
|
||||||
|
{
|
||||||
|
m_authDialog->reset();
|
||||||
|
m_authDialog->show();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
// Connect signal so dialog hides if valid session found, shows and resets on sign out
|
// Connect signal so dialog hides if valid session found, shows and resets on sign out
|
||||||
connect(m_authManager, &AuthManager::isSignedInChanged, this, [this]() {
|
connect(m_authManager, &AuthManager::isSignedInChanged, this, [this]() {
|
||||||
|
|||||||
Reference in New Issue
Block a user