mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-12-16 17:13:58 -05:00
made rsGxsForum provide posts in a hierarchy, to ease the display from JSON API clients, and fixed the unread posts counting
This commit is contained in:
parent
c970e94221
commit
f667daba98
3 changed files with 40 additions and 424 deletions
|
|
@ -104,11 +104,23 @@ bool GxsForumsDialog::getGroupData(std::list<RsGxsGenericGroupData*>& groupInfo)
|
|||
|
||||
bool GxsForumsDialog::getGroupStatistics(const RsGxsGroupId& groupId,GxsGroupStatistic& stat)
|
||||
{
|
||||
return rsGxsForums->getForumStatistics(groupId,stat);
|
||||
RsGxsForumStatistics s;
|
||||
|
||||
if(!rsGxsForums->getForumStatistics(groupId,s))
|
||||
return false;
|
||||
|
||||
stat.mGrpId = groupId;
|
||||
stat.mNumMsgs = s.mNumberOfMessages;
|
||||
|
||||
stat.mTotalSizeOfMsgs = 0; // hopefuly unused. Required the loading of the full channel data, so not very convenient.
|
||||
stat.mNumThreadMsgsNew = s.mNumberOfNewMessages;
|
||||
stat.mNumThreadMsgsUnread = s.mNumberOfUnreadMessages;
|
||||
stat.mNumChildMsgsNew = 0;
|
||||
stat.mNumChildMsgsUnread = 0;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
QString GxsForumsDialog::getHelpString() const
|
||||
{
|
||||
int H = misc::getFontSizeFactor("HelpButton").height();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue