diff --git a/callwidget.cpp b/callwidget.cpp index 57a99d9517f5624e0523102abd36dd31e00ff58e..8cac5a0b1d4eccd60604bb87192dedfa17064f88 100644 --- a/callwidget.cpp +++ b/callwidget.cpp @@ -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_); diff --git a/newwizardwidget.cpp b/newwizardwidget.cpp index e1c74dd157ccad2dc3e5a9b29f1df77674d0ce16..6acce359162ffa37ecafea65976b3f42fdd02bd1 100644 --- a/newwizardwidget.cpp +++ b/newwizardwidget.cpp @@ -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()); } diff --git a/videooverlay.cpp b/videooverlay.cpp index 97a6e8293b920e5b5bb498dc0a2676b18a71c1b4..1a133b3325ad59e1b201dd54c10cfa8018a5a5b9 100644 --- a/videooverlay.cpp +++ b/videooverlay.cpp @@ -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; } });