mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
small check to avoid re-loading already loaded msg
This commit is contained in:
parent
49ea154490
commit
1163d00ae9
@ -937,7 +937,12 @@ void GxsForumThreadWidget::changedThread(QModelIndex index)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
mThreadId = mOrigThreadId = RsGxsMessageId(index.sibling(index.row(),RsGxsForumModel::COLUMN_THREAD_MSGID).data(Qt::UserRole).toString().toStdString());
|
RsGxsMessageId new_id(index.sibling(index.row(),RsGxsForumModel::COLUMN_THREAD_MSGID).data(Qt::UserRole).toString().toStdString());
|
||||||
|
|
||||||
|
if(new_id == mThreadId)
|
||||||
|
return;
|
||||||
|
|
||||||
|
mThreadId = mOrigThreadId = new_id;
|
||||||
|
|
||||||
std::cerr << "Switched to new thread ID " << mThreadId << std::endl;
|
std::cerr << "Switched to new thread ID " << mThreadId << std::endl;
|
||||||
|
|
||||||
@ -1164,7 +1169,6 @@ void GxsForumThreadWidget::insertMessageData(const RsGxsForumMsg &msg)
|
|||||||
QString extraTxt = RsHtml().formatText(ui->postText->document(), QString::fromUtf8(msg.mMsg.c_str()),flags);
|
QString extraTxt = RsHtml().formatText(ui->postText->document(), QString::fromUtf8(msg.mMsg.c_str()),flags);
|
||||||
ui->postText->setHtml(extraTxt);
|
ui->postText->setHtml(extraTxt);
|
||||||
}
|
}
|
||||||
// ui->threadTitle->setText(QString::fromUtf8(msg.mMeta.mMsgName.c_str()));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void GxsForumThreadWidget::previousMessage()
|
void GxsForumThreadWidget::previousMessage()
|
||||||
|
Loading…
Reference in New Issue
Block a user