force accounts initialization on oidc authenticated

This commit is contained in:
gaelle 2025-02-24 11:50:20 +01:00
parent 5d77bd257d
commit 8c5ebd8b5e
4 changed files with 8 additions and 1 deletions

View file

@ -1110,7 +1110,7 @@ void App::setSysTrayIcon() {
}); });
} }
QAction *quitAction = new QAction(tr("Quit"), root); QAction *quitAction = new QAction(tr("Quitter"), root);
root->connect(quitAction, &QAction::triggered, this, &App::quit); root->connect(quitAction, &QAction::triggered, this, &App::quit);
// trayIcon: Left click actions. // trayIcon: Left click actions.

View file

@ -84,6 +84,11 @@ void AccountList::setSelf(QSharedPointer<AccountList> me) {
}); });
mModelConnection->makeConnectToModel(&CoreModel::accountRemoved, [this] { emit lUpdate(); }); mModelConnection->makeConnectToModel(&CoreModel::accountRemoved, [this] { emit lUpdate(); });
mModelConnection->makeConnectToModel(&CoreModel::accountAdded, [this] { emit lUpdate(true); }); mModelConnection->makeConnectToModel(&CoreModel::accountAdded, [this] { emit lUpdate(true); });
// force initialization on bearer account added to automatically go on the main page
// with the open id account
mModelConnection->makeConnectToModel(&CoreModel::bearerAccountAdded, [this] {
setInitialized(false);
emit lUpdate(true); });
mModelConnection->makeConnectToModel( mModelConnection->makeConnectToModel(
&CoreModel::globalStateChanged, &CoreModel::globalStateChanged,

View file

@ -198,5 +198,6 @@ void OIDCModel::setBearers() {
mAuthInfo->setRefreshToken(refreshBearer); mAuthInfo->setRefreshToken(refreshBearer);
mAuthInfo->setAccessToken(accessBearer); mAuthInfo->setAccessToken(accessBearer);
CoreModel::getInstance()->getCore()->addAuthInfo(mAuthInfo); CoreModel::getInstance()->getCore()->addAuthInfo(mAuthInfo);
emit CoreModel::getInstance()->bearerAccountAdded();
emit finished(); emit finished();
} }

View file

@ -69,6 +69,7 @@ signals:
void friendCreated(const std::shared_ptr<linphone::Friend> &f); void friendCreated(const std::shared_ptr<linphone::Friend> &f);
void friendRemoved(const std::shared_ptr<linphone::Friend> &f); void friendRemoved(const std::shared_ptr<linphone::Friend> &f);
void friendUpdated(const std::shared_ptr<linphone::Friend> &f); void friendUpdated(const std::shared_ptr<linphone::Friend> &f);
void bearerAccountAdded();
void conferenceInfoCreated(const std::shared_ptr<linphone::ConferenceInfo> &confInfo); void conferenceInfoCreated(const std::shared_ptr<linphone::ConferenceInfo> &confInfo);
void unreadNotificationsChanged(); void unreadNotificationsChanged();
void requestFetchConfig(QString path); void requestFetchConfig(QString path);