fixed bug in forum post addressing, causing bad update of what has changed when setting messages as read

This commit is contained in:
csoler 2021-01-03 22:34:36 +01:00
parent 92555caa25
commit 3a54b2de15

View File

@ -1276,7 +1276,10 @@ void RsGxsForumModel::recursSetMsgReadStatus(ForumModelIndex i,bool read_status,
else
rsGxsForums->setMessageReadStatus(token,std::make_pair( mForumGroup.mMeta.mGroupId, mPosts[i].mMsgId ), read_status);
QModelIndex itemIndex = createIndex(i - 1, 0, &mPosts[i]);
void *ref ;
convertTabEntryToRefPointer(i,ref); // we dont use i+1 here because i is not a row, but an index in the mPosts tab
QModelIndex itemIndex = createIndex(i - 1, 0, ref);
emit dataChanged(itemIndex, itemIndex);
}