Merge pull request #2774 from csoler/v0.6-BugFixing_31

Quick bug fix in friend list.
This commit is contained in:
csoler 2023-09-27 19:33:23 +02:00 committed by GitHub
commit 96ae492bad
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 10 additions and 5 deletions

View File

@ -1145,8 +1145,6 @@ void RsFriendListModel::updateInternalData()
mLocations.clear(); mLocations.clear();
mTopLevel.clear(); mTopLevel.clear();
endResetModel();
auto TL = mTopLevel ; // This allows to fill TL without touching mTopLevel outside of [begin/end]InsertRows(). auto TL = mTopLevel ; // This allows to fill TL without touching mTopLevel outside of [begin/end]InsertRows().
// create a map of profiles and groups // create a map of profiles and groups
@ -1282,6 +1280,7 @@ void RsFriendListModel::updateInternalData()
endInsertRows(); endInsertRows();
} }
endResetModel();
postMods(); postMods();
mLastInternalDataUpdate = time(NULL); mLastInternalDataUpdate = time(NULL);

View File

@ -29,6 +29,8 @@
#include <QMessageBox> #include <QMessageBox>
#include <QDateTime> #include <QDateTime>
//#define DEBUG_COMMENT_DIALOG 1
/** Constructor */ /** Constructor */
GxsCommentDialog::GxsCommentDialog(QWidget *parent, const RsGxsId &default_author, RsGxsCommentService *comment_service) GxsCommentDialog::GxsCommentDialog(QWidget *parent, const RsGxsId &default_author, RsGxsCommentService *comment_service)
: QWidget(parent), ui(new Ui::GxsCommentDialog) : QWidget(parent), ui(new Ui::GxsCommentDialog)
@ -96,8 +98,9 @@ void GxsCommentDialog::commentClear()
void GxsCommentDialog::commentLoad(const RsGxsGroupId &grpId, const std::set<RsGxsMessageId>& msg_versions,const RsGxsMessageId& most_recent_msgId,bool use_cache) void GxsCommentDialog::commentLoad(const RsGxsGroupId &grpId, const std::set<RsGxsMessageId>& msg_versions,const RsGxsMessageId& most_recent_msgId,bool use_cache)
{ {
#ifdef DEBUG_COMMENT_DIALOG #ifdef DEBUG_COMMENT_DIALOG
std::cerr << "GxsCommentDialog::commentLoad(" << grpId << ", most recent msg version: " << most_recent_msgId << ")"; std::cerr << "GxsCommentDialog::commentLoad(" << grpId << ", most recent msg version: " << most_recent_msgId << ")" << std::endl;
std::cerr << std::endl; for(const auto& mid:msg_versions)
std::cerr << " msg version: " << mid << std::endl;
#endif #endif
mGrpId = grpId; mGrpId = grpId;

View File

@ -73,6 +73,7 @@ std::map<RsGxsMessageId, std::vector<RsGxsComment> > GxsCommentTreeWidget::mComm
QMutex GxsCommentTreeWidget::mCacheMutex; QMutex GxsCommentTreeWidget::mCacheMutex;
//#define USE_NEW_DELEGATE 1 //#define USE_NEW_DELEGATE 1
//#define DEBUG_GXSCOMMENT_TREEWIDGET 1
// This class allows to draw the item using an appropriate size // This class allows to draw the item using an appropriate size
@ -508,6 +509,8 @@ void GxsCommentTreeWidget::service_requestComments(const RsGxsGroupId& group_id,
/* request comments */ /* request comments */
#ifdef DEBUG_GXSCOMMENT_TREEWIDGET #ifdef DEBUG_GXSCOMMENT_TREEWIDGET
std::cerr << "GxsCommentTreeWidget::service_requestComments for group " << group_id << std::endl; std::cerr << "GxsCommentTreeWidget::service_requestComments for group " << group_id << std::endl;
for(const auto& mid:msgIds)
std::cerr << " including message " << mid << std::endl;
#endif #endif
RsThread::async([this,group_id,msgIds]() RsThread::async([this,group_id,msgIds]()