mirror of
https://git.wownero.com/wowlet/wowlet.git
synced 2024-08-15 01:03:14 +00:00
truncate the yellowpages suffix for contacts
This commit is contained in:
parent
373fe8e02a
commit
3b3ec89306
1 changed files with 3 additions and 3 deletions
|
@ -38,7 +38,7 @@ ContactsWidget::ContactsWidget(QWidget *parent) :
|
||||||
auto username = index.model()->data(index.siblingAtColumn(AddressBookModel::Description), Qt::UserRole).toString();
|
auto username = index.model()->data(index.siblingAtColumn(AddressBookModel::Description), Qt::UserRole).toString();
|
||||||
|
|
||||||
m_rowMenu = new QMenu(ui->contacts);
|
m_rowMenu = new QMenu(ui->contacts);
|
||||||
if(username.contains("(YellWOWPages)"))
|
if(username.contains("(yp)"))
|
||||||
m_rowMenu->addAction(QIcon(":/assets/images/network.png"), "Visit user's YellWOWPage", this, &ContactsWidget::visitYellowPage);
|
m_rowMenu->addAction(QIcon(":/assets/images/network.png"), "Visit user's YellWOWPage", this, &ContactsWidget::visitYellowPage);
|
||||||
|
|
||||||
m_rowMenu->addAction(QIcon(":/assets/images/copy.png"), "Copy address", this, &ContactsWidget::copyAddress);
|
m_rowMenu->addAction(QIcon(":/assets/images/copy.png"), "Copy address", this, &ContactsWidget::copyAddress);
|
||||||
|
@ -89,7 +89,7 @@ void ContactsWidget::loadYellowPages() {
|
||||||
auto contacts = this->data();
|
auto contacts = this->data();
|
||||||
for (auto item: m_ctx->yellowPagesData) {
|
for (auto item: m_ctx->yellowPagesData) {
|
||||||
auto obj = item.toObject();
|
auto obj = item.toObject();
|
||||||
const auto username = QString("%1 (YellWOWPages)").arg(obj.value("username").toString());
|
const auto username = QString("%1 (yp)").arg(obj.value("username").toString());
|
||||||
const auto address = obj.value("address").toString();
|
const auto address = obj.value("address").toString();
|
||||||
|
|
||||||
if(contacts.contains(username)) {
|
if(contacts.contains(username)) {
|
||||||
|
@ -115,7 +115,7 @@ void ContactsWidget::visitYellowPage() {
|
||||||
auto username = index.model()->data(
|
auto username = index.model()->data(
|
||||||
index.siblingAtColumn(AddressBookModel::Description),
|
index.siblingAtColumn(AddressBookModel::Description),
|
||||||
Qt::UserRole).toString();
|
Qt::UserRole).toString();
|
||||||
username = username.replace(" (YellWOWPages)", "").trimmed();
|
username = username.replace(" (yp)", "").trimmed();
|
||||||
Utils::externalLinkWarning(this, QString("https://yellow.wownero.com/user/%1").arg(username));
|
Utils::externalLinkWarning(this, QString("https://yellow.wownero.com/user/%1").arg(username));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue