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)
if (to) {
updateSmartList();
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();
} else {
QObject::disconnect(smartlistSelectionConnection_);
......
......@@ -413,11 +413,6 @@ NewWizardWidget::createRingAccount(const QString &displayName,
auto confProps = LRCInstance::accountModel().getAccountConfig(accountId);
confProps.Ringtone.ringtonePath = Utils::GetRingtonePath().toStdString();
LRCInstance::accountModel().setAccountConfig(accountId, confProps);
LRCInstance::editableAccountModel()->registerName(
LRCInstance::getCurrAccId(),
"",
registeredName_.toStdString()
);
connect(LRCInstance::editableAccountModel(),
&lrc::api::NewAccountModel::nameRegistrationEnded,
[this] {
......@@ -425,6 +420,11 @@ NewWizardWidget::createRingAccount(const QString &displayName,
LRCInstance::accountModel().setAccountConfig(LRCInstance::getCurrAccId(), accountProperties);
emit NavigationRequested(ScreenEnum::CallScreen);
});
LRCInstance::editableAccountModel()->registerName(
LRCInstance::getCurrAccId(),
"",
registeredName_.toStdString()
);
if (ui->setAvatarWidget->hasAvatar()) {
LRCInstance::setCurrAccAvatar(ui->setAvatarWidget->getAvatarPixmap());
}
......
......@@ -57,8 +57,8 @@ VideoOverlay::VideoOverlay(QWidget* parent) :
[this](const std::string& tempCallId) {
callId = tempCallId;
});
QObject::disconnect(*connection);
if (connection) {
QObject::disconnect(*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