diff --git a/accountitemdelegate.cpp b/accountitemdelegate.cpp index 262069784576bc423fd885267e7f015e0e2e965d..ce8d965ac7d7a7e765953159c8e44f09c518f934 100644 --- a/accountitemdelegate.cpp +++ b/accountitemdelegate.cpp @@ -112,7 +112,8 @@ AccountItemDelegate::paint(QPainter* painter, painter->drawText(rectTexts, Qt::AlignVCenter | Qt::AlignLeft, nameStr); } - // Display the ID under the name + // Display the secondary ID under the name + QString idStr = index.data(static_cast<int>(AccountListModel::Role::Username)).value<QString>(); if (idStr != name.toString()) { font.setItalic(false); diff --git a/accountlistmodel.cpp b/accountlistmodel.cpp index 0297d434504f6079ed96a03c63ed1b581a45242a..a418e7b20ef539754e2ff3c1a178d565fecf69d9 100644 --- a/accountlistmodel.cpp +++ b/accountlistmodel.cpp @@ -62,7 +62,7 @@ QVariant AccountListModel::data(const QModelIndex &index, int role) const case Qt::DisplayRole: return QVariant(QString::fromStdString(accountInfo.profileInfo.alias)); case Role::Username: - return QVariant(QString::fromStdString(accountInfo.profileInfo.uri)); + return QVariant(QString::fromStdString(Utils::secondBestNameForAccount(accountInfo))); case Role::Type: return QVariant(Utils::toUnderlyingValue<lrc::api::profile::Type>(accountInfo.profileInfo.type)); case Role::Status: