mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-12-24 23:19:29 -05:00
Merge pull request #1860 from csoler/v0.6-ImprovedGUI_5
fixed bug causing forums to collapse when browsing messages
This commit is contained in:
commit
27bbd50f1f
@ -1213,7 +1213,7 @@ void RsGxsForumModel::setMsgReadStatus(const QModelIndex& i,bool read_status,boo
|
||||
if(!i.isValid())
|
||||
return ;
|
||||
|
||||
preMods();
|
||||
// no need to call preMods()/postMods() here because we'renot changing the model
|
||||
|
||||
void *ref = i.internalPointer();
|
||||
uint32_t entry = 0;
|
||||
@ -1225,7 +1225,14 @@ void RsGxsForumModel::setMsgReadStatus(const QModelIndex& i,bool read_status,boo
|
||||
recursSetMsgReadStatus(entry,read_status,with_children) ;
|
||||
recursUpdateReadStatusAndTimes(0,has_unread_below,has_read_below);
|
||||
|
||||
postMods();
|
||||
// Normally we should only update the parents up to the top of the tree, but it's complicated and the update here doesn't really cost,
|
||||
// so we blindly update the whole widget.
|
||||
|
||||
if(mTreeMode == TREE_MODE_FLAT)
|
||||
emit dataChanged(createIndex(0,0,(void*)NULL), createIndex(mPosts.size(),COLUMN_THREAD_NB_COLUMNS-1,(void*)NULL));
|
||||
else
|
||||
emit dataChanged(createIndex(0,0,(void*)NULL), createIndex(mPosts[0].mChildren.size(),COLUMN_THREAD_NB_COLUMNS-1,(void*)NULL));
|
||||
|
||||
}
|
||||
|
||||
void RsGxsForumModel::recursSetMsgReadStatus(ForumModelIndex i,bool read_status,bool with_children)
|
||||
|
@ -1722,6 +1722,7 @@ void GxsForumThreadWidget::postForumLoading()
|
||||
recursRestoreExpandedItems(mThreadProxyModel->mapFromSource(mThreadModel->root()),mSavedExpandedMessages);
|
||||
//mUpdating = false;
|
||||
}
|
||||
|
||||
void GxsForumThreadWidget::updateGroupData()
|
||||
{
|
||||
if(groupId().isNull())
|
||||
|
Loading…
Reference in New Issue
Block a user