mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-12-17 20:04:22 -05:00
fixing some UI errors in Mail
This commit is contained in:
parent
8bcb531cd3
commit
302e87e476
@ -515,7 +515,8 @@ QVariant RsMessageModel::displayRole(const Rs::Msgs::MsgInfoSummary& fmpe,int co
|
|||||||
|
|
||||||
auto Tag = Tags.types.find(*tagit);
|
auto Tag = Tags.types.find(*tagit);
|
||||||
|
|
||||||
if (Tag != Tags.types.end())
|
if (Tag != Tags.types.end()) if (Tag != Tags.types.end())
|
||||||
|
|
||||||
text += TagDefs::name(Tag->first, Tag->second.first);
|
text += TagDefs::name(Tag->first, Tag->second.first);
|
||||||
else
|
else
|
||||||
RS_WARN("Unknown tag ", (int)Tag->first, " in message ", fmpe.msgId);
|
RS_WARN("Unknown tag ", (int)Tag->first, " in message ", fmpe.msgId);
|
||||||
@ -524,14 +525,43 @@ QVariant RsMessageModel::displayRole(const Rs::Msgs::MsgInfoSummary& fmpe,int co
|
|||||||
}
|
}
|
||||||
case COLUMN_THREAD_TO: {
|
case COLUMN_THREAD_TO: {
|
||||||
QString name;
|
QString name;
|
||||||
RsGxsId id = RsGxsId(fmpe.to.toStdString()); // not sure of the type
|
|
||||||
|
|
||||||
|
switch(mCurrentBox)
|
||||||
|
{
|
||||||
|
case Rs::Msgs::BoxName::BOX_DRAFTS: // in this case, we display the full list of destinations
|
||||||
|
case Rs::Msgs::BoxName::BOX_TRASH: // in this case, we display the full list of destinations
|
||||||
|
case Rs::Msgs::BoxName::BOX_SENT: // in this case, we display the full list of destinations
|
||||||
|
{
|
||||||
|
for(auto d:fmpe.destinations)
|
||||||
|
{
|
||||||
|
QString tmp;
|
||||||
|
GxsIdTreeItemDelegate::computeName(RsGxsId(d.toStdString()),tmp); // not nice, but works.
|
||||||
|
if(tmp.isNull())
|
||||||
|
name += QString(tr("[Notification]") + ", ");
|
||||||
|
else
|
||||||
|
name += tmp + ", " ;
|
||||||
|
}
|
||||||
|
name.chop(2);
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case Rs::Msgs::BoxName::BOX_NONE: // in these cases, we display the actual destination
|
||||||
|
case Rs::Msgs::BoxName::BOX_INBOX: // in these cases, we display the actual destination
|
||||||
|
case Rs::Msgs::BoxName::BOX_OUTBOX:
|
||||||
|
{
|
||||||
|
RsGxsId id = RsGxsId(fmpe.to.toStdString()); // use "to" field, which is populated in Outbox, .
|
||||||
if(id.isNull())
|
if(id.isNull())
|
||||||
return QVariant(tr("[Notification]"));
|
return QVariant(tr("[Notification]"));
|
||||||
if(GxsIdTreeItemDelegate::computeName(id,name))
|
else
|
||||||
|
{
|
||||||
|
GxsIdTreeItemDelegate::computeName(id,name);
|
||||||
return name;
|
return name;
|
||||||
return QVariant(tr("[Unknown]"));
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
case COLUMN_THREAD_AUTHOR:{
|
case COLUMN_THREAD_AUTHOR:{
|
||||||
QString name;
|
QString name;
|
||||||
|
Loading…
Reference in New Issue
Block a user