GODT-2042: fix setup guide not always showing on first login.

This commit is contained in:
Xavier Michelon
2022-12-02 11:17:28 +01:00
parent e87db5b2ab
commit 4003e0a2ab
20 changed files with 1039 additions and 1033 deletions

View File

@ -126,12 +126,8 @@ void QMLBackend::connectGrpcEvents()
connect(client, &GRPCClient::login2PasswordRequested, this, &QMLBackend::login2PasswordRequested);
connect(client, &GRPCClient::login2PasswordError, this, &QMLBackend::login2PasswordError);
connect(client, &GRPCClient::login2PasswordErrorAbort, this, &QMLBackend::login2PasswordErrorAbort);
connect(client, &GRPCClient::loginFinished, this, [&](QString const &userID) {
this->retrieveUserList();
qint32 const index = users_->rowOfUserID(userID); emit loginFinished(index); });
connect(client, &GRPCClient::loginAlreadyLoggedIn, this, [&](QString const &userID) {
this->retrieveUserList();
qint32 const index = users_->rowOfUserID(userID); emit loginAlreadyLoggedIn(index); });
connect(client, &GRPCClient::loginFinished, this, &QMLBackend::onLoginFinished);
connect(client, &GRPCClient::loginAlreadyLoggedIn, this, &QMLBackend::onLoginAlreadyLoggedIn);
// update events
connect(client, &GRPCClient::updateManualError, this, &QMLBackend::updateManualError);
@ -429,6 +425,28 @@ void QMLBackend::setMailServerSettings(int imapPort, int smtpPort, bool useSSLFo
}
//****************************************************************************************************************************************************
/// \param[in] userID the userID.
/// \param[in] wasSignedOut Was the user signed-out.
//****************************************************************************************************************************************************
void QMLBackend::onLoginFinished(QString const &userID, bool wasSignedOut)
{
this->retrieveUserList();
qint32 const index = users_->rowOfUserID(userID);
emit loginFinished(index, wasSignedOut);
}
//****************************************************************************************************************************************************
/// \param[in] userID the userID.
//****************************************************************************************************************************************************
void QMLBackend::onLoginAlreadyLoggedIn(QString const &userID)
{
this->retrieveUserList();
qint32 const index = users_->rowOfUserID(userID);
emit loginAlreadyLoggedIn(index);
}
//****************************************************************************************************************************************************
/// \param[in] useSSLForIMAP The value for the 'Use SSL for IMAP' property
/// \param[in] useSSLForSMTP The value for the 'Use SSL for SMTP' property