mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-11-23 01:10:39 -05:00
attempt to delay channel post loading on demand when displayed
This commit is contained in:
parent
e9f9856048
commit
b6d5c55516
3 changed files with 48 additions and 16 deletions
|
|
@ -407,10 +407,12 @@ void GxsChannelPostsWidget::createPostItem(const RsGxsChannelPost &post, bool re
|
|||
if(item)
|
||||
{
|
||||
ui->feedWidget->removeFeedItem(item) ;
|
||||
RsGxsChannelGroup dummyGroup;
|
||||
dummyGroup.mMeta.mGroupId = groupId();
|
||||
dummyGroup.mMeta.mSubscribeFlags = 0xffffffff;
|
||||
GxsChannelPostItem *item = new GxsChannelPostItem(this, 0, dummyGroup, post, true, false);
|
||||
//RsGxsChannelGroup dummyGroup;
|
||||
//dummyGroup.mMeta.mGroupId = groupId();
|
||||
//dummyGroup.mMeta.mSubscribeFlags = 0xffffffff;
|
||||
//GxsChannelPostItem *item = new GxsChannelPostItem(this, 0, dummyGroup, post, true, false);
|
||||
|
||||
GxsChannelPostItem *item = new GxsChannelPostItem(this, 0, post.mMeta.mGroupId, post.mMeta.mMsgId, true, true);
|
||||
ui->feedWidget->addFeedItem(item, ROLE_PUBLISH, QDateTime::fromTime_t(post.mMeta.mPublishTs));
|
||||
|
||||
return ;
|
||||
|
|
@ -427,10 +429,13 @@ void GxsChannelPostsWidget::createPostItem(const RsGxsChannelPost &post, bool re
|
|||
ui->feedWidget->setSort(item, ROLE_PUBLISH, QDateTime::fromTime_t(post.mMeta.mPublishTs));
|
||||
} else {
|
||||
/* Group is not always available because of the TokenQueue */
|
||||
RsGxsChannelGroup dummyGroup;
|
||||
dummyGroup.mMeta.mGroupId = groupId();
|
||||
dummyGroup.mMeta.mSubscribeFlags = 0xffffffff;
|
||||
GxsChannelPostItem *item = new GxsChannelPostItem(this, 0, dummyGroup, post, true, false);
|
||||
|
||||
//RsGxsChannelGroup dummyGroup;
|
||||
//dummyGroup.mMeta.mGroupId = groupId();
|
||||
//dummyGroup.mMeta.mSubscribeFlags = 0xffffffff;
|
||||
//GxsChannelPostItem *item = new GxsChannelPostItem(this, 0, dummyGroup, post, true, false);
|
||||
|
||||
GxsChannelPostItem *item = new GxsChannelPostItem(this, 0, post.mMeta.mGroupId, post.mMeta.mMsgId, true, true);
|
||||
ui->feedWidget->addFeedItem(item, ROLE_PUBLISH, QDateTime::fromTime_t(post.mMeta.mPublishTs));
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue