mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-19 14:30:43 -04:00
fixed a few bugs in display of tracking info
This commit is contained in:
parent
2096cd6c52
commit
79c80c968a
8 changed files with 53 additions and 26 deletions
|
@ -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());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue