fixed icon in To column of Sent box

This commit is contained in:
csoler 2023-08-06 23:12:06 +02:00
parent 3fa0b8f6d4
commit a382d58b68
3 changed files with 26 additions and 10 deletions

View file

@ -579,7 +579,18 @@ QVariant RsMessageModel::userRole(const Rs::Msgs::MsgInfoSummary& fmpe,int col)
{
case COLUMN_THREAD_AUTHOR: return QVariant(QString::fromStdString(fmpe.from.toStdString()));
case COLUMN_THREAD_MSGID: return QVariant(QString::fromStdString(fmpe.msgId));
case COLUMN_THREAD_TO: return QVariant(QString::fromStdString(fmpe.to.toStdString()));
case COLUMN_THREAD_TO:
{
// First check if the .to field is filled.
if(!fmpe.to.toStdString().empty())
return QVariant(QString::fromStdString(fmpe.to.toStdString()));
// In the Send box, .to is never filled. In this case we look into destinations.
if(fmpe.destinations.size()==1)
return QVariant(QString::fromStdString((*fmpe.destinations.begin()).toStdString()));
}
default:
return QVariant();
}