Commit 68779c43 authored by Edric Milaret's avatar Edric Milaret

ring: set displayName for Ring account

Refs #77362

Change-Id: I87497043225d1c4f9fde3c6afe92ddc24bc19c5e
parent 1eca0290
......@@ -138,7 +138,7 @@ CallWidget::findRingAccount(QModelIndex idx1, QModelIndex idx2, QVector<int> vec
if ((Account::Protocol)protocol.toUInt() == Account::Protocol::RING) {
auto username = idx.data(static_cast<int>(Account::Role::Username));
ui->ringIdLabel->setText(
"Your Ring ID: " + username.toString());
"Your Ring ID: " + username.toString());
found = true;
return;
}
......@@ -203,9 +203,12 @@ CallWidget::findRingAccount()
auto idx = AccountModel::instance()->index(i, 0);
auto protocol = idx.data(static_cast<int>(Account::Role::Proto));
if ((Account::Protocol)protocol.toUInt() == Account::Protocol::RING) {
auto username = idx.data(static_cast<int>(Account::Role::Username));
auto account = AccountModel::instance()->getAccountByModelIndex(idx);
if (account->displayName().isEmpty())
account->displayName() = account->alias();
auto username = account->username();
ui->ringIdLabel->setText(
ui->ringIdLabel->text() + " " + username.toString());
"Your Ring ID: " + username);
found = true;
return;
}
......
......@@ -67,6 +67,7 @@ WizardDialog::accept()
Utils::CreateStartupLink();
auto account = AccountModel::instance()->add(ui->usernameEdit->text(), Account::Protocol::RING);
account->setDisplayName(ui->usernameEdit->text());
AccountModel::instance()->ip2ip()->setRingtonePath(Utils::GetRingtonePath());
account->setRingtonePath(Utils::GetRingtonePath());
account->setUpnpEnabled(true);
......
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