diff --git a/retroshare-gui/src/gui/gxsforums/GxsForumThreadWidget.cpp b/retroshare-gui/src/gui/gxsforums/GxsForumThreadWidget.cpp index fb7b3d1be..06e8e4d9d 100644 --- a/retroshare-gui/src/gui/gxsforums/GxsForumThreadWidget.cpp +++ b/retroshare-gui/src/gui/gxsforums/GxsForumThreadWidget.cpp @@ -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())