fixed a few bugs in display of tracking info

This commit is contained in:
csoler 2015-10-27 22:41:29 -04:00
parent 2096cd6c52
commit 79c80c968a
8 changed files with 53 additions and 26 deletions

View file

@ -548,6 +548,17 @@ void GxsForumThreadWidget::changedThread()
mThreadId = RsGxsMessageId(item->data(COLUMN_THREAD_DATA, ROLE_THREAD_MSGID).toString().toStdString());
}
// Show info about who passed on this message.
if(mForumGroup.mMeta.mSignFlags & GXS_SERV::FLAG_AUTHOR_AUTHENTICATION_TRACK_MESSAGES)
{
RsPeerId providerId ;
std::string msgId = item->data(COLUMN_THREAD_DATA, ROLE_THREAD_MSGID).toString().toStdString();
RsGxsMessageId mid(msgId) ;
if(rsGRouter->getTrackingInfo(mid,providerId) && !providerId.isNull() )
item->setToolTip(COLUMN_THREAD_TITLE,tr("This message was obtained from %1").arg(QString::fromUtf8(rsPeers->getPeerName(providerId).c_str())));
}
if (mFillThread) {
return;
}
@ -952,14 +963,6 @@ QTreeWidgetItem *GxsForumThreadWidget::convertMsgToThreadWidget(const RsGxsForum
// Set later with GxsIdRSTreeWidgetItem::setId
item->setData(COLUMN_THREAD_DATA, ROLE_THREAD_AUTHOR, QString::fromStdString(msg.mMeta.mAuthorId.toStdString()));
// Show info about who passed on this message.
if(mForumGroup.mMeta.mSignFlags & GXS_SERV::FLAG_AUTHOR_AUTHENTICATION_TRACK_MESSAGES)
{
RsPeerId providerId ;
if(rsGRouter->getTrackingInfo(msg.mMeta.mMsgId,providerId) && !providerId.isNull() )
item->setToolTip(COLUMN_THREAD_TITLE,tr("This message was obtained from %1").arg(QString::fromUtf8(rsPeers->getPeerName(providerId).c_str())));
}
//#TODO
#if 0
text = QString::fromUtf8(authorName.c_str());