- Added new base class for group feeds - GxsGroupFeedItem

- Added feed item for channel group
- Added test of feed items for channels and forums
- Reworked existing feed items

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@7689 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
thunder2 2014-11-18 00:49:21 +00:00
parent fd20f629dc
commit 97968170d1
16 changed files with 1524 additions and 452 deletions

View file

@ -329,11 +329,14 @@ void GxsChannelPostsWidget::createPostItem(const RsGxsChannelPost &post, bool re
item = dynamic_cast<GxsChannelPostItem*>(feedItem);
}
if (item) {
item->setContent(post);
item->setPost(post);
ui->feedWidget->setSort(item, ROLE_PUBLISH, QDateTime::fromTime_t(post.mMeta.mPublishTs));
} else {
uint32_t subscribeFlags = 0xffffffff;
GxsChannelPostItem *item = new GxsChannelPostItem(this, 0, post, subscribeFlags, true, false);
/* 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);
ui->feedWidget->addFeedItem(item, ROLE_PUBLISH, QDateTime::fromTime_t(post.mMeta.mPublishTs));
}