mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
fixed update of threads in new model
This commit is contained in:
parent
419bd2157a
commit
dc913e37c9
@ -459,6 +459,8 @@ void RsGxsForumModel::setForum(const RsGxsGroupId& forum_group_id)
|
|||||||
|
|
||||||
void RsGxsForumModel::setPosts(const RsGxsForumGroup& group, const std::vector<ForumModelPostEntry>& posts)
|
void RsGxsForumModel::setPosts(const RsGxsForumGroup& group, const std::vector<ForumModelPostEntry>& posts)
|
||||||
{
|
{
|
||||||
|
emit dataChanged(createIndex(0,0,(void*)NULL), createIndex(0,COLUMN_THREAD_NB_COLUMNS-1,(void*)NULL));
|
||||||
|
|
||||||
mForumGroup = group;
|
mForumGroup = group;
|
||||||
mPosts = posts;
|
mPosts = posts;
|
||||||
|
|
||||||
@ -476,7 +478,6 @@ void RsGxsForumModel::setPosts(const RsGxsForumGroup& group, const std::vector<F
|
|||||||
debug_dump();
|
debug_dump();
|
||||||
|
|
||||||
emit layoutChanged();
|
emit layoutChanged();
|
||||||
emit dataChanged(createIndex(0,0,(void*)NULL), createIndex(0,COLUMN_THREAD_NB_COLUMNS-1,(void*)NULL));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void RsGxsForumModel::update_posts(const RsGxsGroupId& group_id)
|
void RsGxsForumModel::update_posts(const RsGxsGroupId& group_id)
|
||||||
|
@ -451,9 +451,11 @@ void GxsForumThreadWidget::blank()
|
|||||||
#endif
|
#endif
|
||||||
ui->forumName->setText("");
|
ui->forumName->setText("");
|
||||||
|
|
||||||
|
#ifdef SUSPENDED_CODE
|
||||||
mStateHelper->setWidgetEnabled(ui->newthreadButton, false);
|
mStateHelper->setWidgetEnabled(ui->newthreadButton, false);
|
||||||
mStateHelper->setWidgetEnabled(ui->previousButton, false);
|
mStateHelper->setWidgetEnabled(ui->previousButton, false);
|
||||||
mStateHelper->setWidgetEnabled(ui->nextButton, false);
|
mStateHelper->setWidgetEnabled(ui->nextButton, false);
|
||||||
|
#endif
|
||||||
ui->versions_CB->hide();
|
ui->versions_CB->hide();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -520,10 +522,8 @@ void GxsForumThreadWidget::groupIdChanged()
|
|||||||
mNewCount = 0;
|
mNewCount = 0;
|
||||||
mUnreadCount = 0;
|
mUnreadCount = 0;
|
||||||
|
|
||||||
emit groupChanged(this);
|
|
||||||
|
|
||||||
mThreadModel->setForum(groupId());
|
mThreadModel->setForum(groupId());
|
||||||
//fillComplete();
|
updateDisplay(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
QString GxsForumThreadWidget::groupName(bool withUnreadCount)
|
QString GxsForumThreadWidget::groupName(bool withUnreadCount)
|
||||||
@ -1077,7 +1077,7 @@ void GxsForumThreadWidget::insertGroupData()
|
|||||||
#ifdef DEBUG_FORUMS
|
#ifdef DEBUG_FORUMS
|
||||||
std::cerr << "GxsForumThreadWidget::insertGroupData" << std::endl;
|
std::cerr << "GxsForumThreadWidget::insertGroupData" << std::endl;
|
||||||
#endif
|
#endif
|
||||||
GxsIdDetails::process(mForumGroup.mMeta.mAuthorId, &loadAuthorIdCallback, this);
|
//GxsIdDetails::process(mForumGroup.mMeta.mAuthorId, &loadAuthorIdCallback, this);
|
||||||
calculateIconsAndFonts();
|
calculateIconsAndFonts();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1788,9 +1788,10 @@ void GxsForumThreadWidget::insertMessage()
|
|||||||
{
|
{
|
||||||
if (groupId().isNull())
|
if (groupId().isNull())
|
||||||
{
|
{
|
||||||
|
#ifdef SUSPENDED_CODE
|
||||||
mStateHelper->setActive(mTokenTypeMessageData, false);
|
mStateHelper->setActive(mTokenTypeMessageData, false);
|
||||||
mStateHelper->clear(mTokenTypeMessageData);
|
mStateHelper->clear(mTokenTypeMessageData);
|
||||||
|
#endif
|
||||||
ui->versions_CB->hide();
|
ui->versions_CB->hide();
|
||||||
ui->time_label->show();
|
ui->time_label->show();
|
||||||
|
|
||||||
@ -1800,8 +1801,10 @@ void GxsForumThreadWidget::insertMessage()
|
|||||||
|
|
||||||
if (mThreadId.isNull())
|
if (mThreadId.isNull())
|
||||||
{
|
{
|
||||||
|
#ifdef SUSPENDED_CODE
|
||||||
mStateHelper->setActive(mTokenTypeMessageData, false);
|
mStateHelper->setActive(mTokenTypeMessageData, false);
|
||||||
mStateHelper->clear(mTokenTypeMessageData);
|
mStateHelper->clear(mTokenTypeMessageData);
|
||||||
|
#endif
|
||||||
|
|
||||||
ui->versions_CB->hide();
|
ui->versions_CB->hide();
|
||||||
ui->time_label->show();
|
ui->time_label->show();
|
||||||
@ -1810,7 +1813,9 @@ void GxsForumThreadWidget::insertMessage()
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef SUSPENDED_CODE
|
||||||
mStateHelper->setActive(mTokenTypeMessageData, true);
|
mStateHelper->setActive(mTokenTypeMessageData, true);
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef TODO
|
#ifdef TODO
|
||||||
QTreeWidgetItem *item = ui->threadTreeWidget->currentItem();
|
QTreeWidgetItem *item = ui->threadTreeWidget->currentItem();
|
||||||
@ -2717,7 +2722,7 @@ void GxsForumThreadWidget::updateGroupData()
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
mForumGroup = group;
|
mForumGroup = group;
|
||||||
insertGroupData();
|
//insertGroupData();
|
||||||
mSubscribeFlags = group.mMeta.mSubscribeFlags;
|
mSubscribeFlags = group.mMeta.mSubscribeFlags;
|
||||||
|
|
||||||
ui->threadTreeWidget->setColumnHidden(RsGxsForumModel::COLUMN_THREAD_DISTRIBUTION, !IS_GROUP_PGP_KNOWN_AUTHED(mForumGroup.mMeta.mSignFlags) && !(IS_GROUP_PGP_AUTHED(mForumGroup.mMeta.mSignFlags)));
|
ui->threadTreeWidget->setColumnHidden(RsGxsForumModel::COLUMN_THREAD_DISTRIBUTION, !IS_GROUP_PGP_KNOWN_AUTHED(mForumGroup.mMeta.mSignFlags) && !(IS_GROUP_PGP_AUTHED(mForumGroup.mMeta.mSignFlags)));
|
||||||
|
Loading…
Reference in New Issue
Block a user