mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
partially fixed async navigate action in forums
This commit is contained in:
parent
39b7bc818b
commit
348f88b6ec
@ -1494,7 +1494,10 @@ bool GxsForumThreadWidget::navigate(const RsGxsMessageId &msgId)
|
||||
QModelIndex source_index = mThreadModel->getIndexOfMessage(msgId);
|
||||
|
||||
if(!source_index.isValid())
|
||||
return false;
|
||||
{
|
||||
mNavigatePendingMsgId = msgId; // not found. That means the forum may not be loaded yet. So we keep that post in mind, for after loading.
|
||||
return true; // we have to return true here, otherwise the caller will intepret the async loading as an error.
|
||||
}
|
||||
|
||||
QModelIndex indx = mThreadProxyModel->mapFromSource(source_index);
|
||||
|
||||
@ -1847,6 +1850,12 @@ void GxsForumThreadWidget::postForumLoading()
|
||||
#ifdef DEBUG_FORUMS
|
||||
std::cerr << "Post forum loading..." << std::endl;
|
||||
#endif
|
||||
if(!mNavigatePendingMsgId.isNull() && mThreadModel->getIndexOfMessage(mNavigatePendingMsgId).isValid())
|
||||
{
|
||||
mThreadId = mNavigatePendingMsgId;
|
||||
mNavigatePendingMsgId.clear();
|
||||
}
|
||||
|
||||
QModelIndex source_index = mThreadModel->getIndexOfMessage(mThreadId);
|
||||
|
||||
if(!mThreadId.isNull() && source_index.isValid())
|
||||
|
Loading…
Reference in New Issue
Block a user