Commit 3fc824d7 authored by Andreas Traczyk's avatar Andreas Traczyk

wizard: update account information after creating first account

Change-Id: I4f952f145184f74b5d744623bb6e2dd182e6ceae
parent 3d0276c5
...@@ -235,6 +235,15 @@ CallWidget::navigated(bool to) ...@@ -235,6 +235,15 @@ CallWidget::navigated(bool to)
if (to) { if (to) {
updateSmartList(); updateSmartList();
connectConversationModel(); connectConversationModel();
try {
auto accountList = LRCInstance::accountModel().getAccountList();
if (accountList.size() == 1) {
auto index = Utils::indexInVector(accountList, LRCInstance::getCurrAccId());
if (index != -1) {
slotAccountChanged(index);
}
}
} catch (...) {}
ui->currentAccountComboBox->updateComboBoxDisplay(); ui->currentAccountComboBox->updateComboBoxDisplay();
} else { } else {
QObject::disconnect(smartlistSelectionConnection_); QObject::disconnect(smartlistSelectionConnection_);
......
...@@ -413,11 +413,6 @@ NewWizardWidget::createRingAccount(const QString &displayName, ...@@ -413,11 +413,6 @@ NewWizardWidget::createRingAccount(const QString &displayName,
auto confProps = LRCInstance::accountModel().getAccountConfig(accountId); auto confProps = LRCInstance::accountModel().getAccountConfig(accountId);
confProps.Ringtone.ringtonePath = Utils::GetRingtonePath().toStdString(); confProps.Ringtone.ringtonePath = Utils::GetRingtonePath().toStdString();
LRCInstance::accountModel().setAccountConfig(accountId, confProps); LRCInstance::accountModel().setAccountConfig(accountId, confProps);
LRCInstance::editableAccountModel()->registerName(
LRCInstance::getCurrAccId(),
"",
registeredName_.toStdString()
);
connect(LRCInstance::editableAccountModel(), connect(LRCInstance::editableAccountModel(),
&lrc::api::NewAccountModel::nameRegistrationEnded, &lrc::api::NewAccountModel::nameRegistrationEnded,
[this] { [this] {
...@@ -425,6 +420,11 @@ NewWizardWidget::createRingAccount(const QString &displayName, ...@@ -425,6 +420,11 @@ NewWizardWidget::createRingAccount(const QString &displayName,
LRCInstance::accountModel().setAccountConfig(LRCInstance::getCurrAccId(), accountProperties); LRCInstance::accountModel().setAccountConfig(LRCInstance::getCurrAccId(), accountProperties);
emit NavigationRequested(ScreenEnum::CallScreen); emit NavigationRequested(ScreenEnum::CallScreen);
}); });
LRCInstance::editableAccountModel()->registerName(
LRCInstance::getCurrAccId(),
"",
registeredName_.toStdString()
);
if (ui->setAvatarWidget->hasAvatar()) { if (ui->setAvatarWidget->hasAvatar()) {
LRCInstance::setCurrAccAvatar(ui->setAvatarWidget->getAvatarPixmap()); LRCInstance::setCurrAccAvatar(ui->setAvatarWidget->getAvatarPixmap());
} }
......
...@@ -57,8 +57,8 @@ VideoOverlay::VideoOverlay(QWidget* parent) : ...@@ -57,8 +57,8 @@ VideoOverlay::VideoOverlay(QWidget* parent) :
[this](const std::string& tempCallId) { [this](const std::string& tempCallId) {
callId = tempCallId; callId = tempCallId;
}); });
QObject::disconnect(*connection);
if (connection) { if (connection) {
QObject::disconnect(*connection);
delete connection; delete connection;
} }
}); });
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment