mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-01-13 16:39:43 -05:00
Merge pull request #2157 from defnax/forums-circle
[Forums] Added to display a new colored forum icons when forum is restricted to a circle
This commit is contained in:
commit
913aa273d0
@ -222,16 +222,20 @@ void GxsForumsDialog::groupInfoToGroupItemInfo(const RsGxsGenericGroupData *grou
|
||||
const RsGxsForumGroup *forumGroupData = dynamic_cast<const RsGxsForumGroup*>(groupData);
|
||||
|
||||
if (!forumGroupData)
|
||||
{
|
||||
{
|
||||
std::cerr << "GxsChannelDialog::groupInfoToGroupItemInfo() Failed to cast data to GxsChannelGroupInfoData"<< std::endl;
|
||||
return;
|
||||
}
|
||||
|
||||
RsGxsCircleDetails details;
|
||||
rsGxsCircles->getCircleDetails(RsGxsCircleId(groupData->mMeta.mCircleId), details) ;
|
||||
|
||||
groupItemInfo.description = QString::fromUtf8(forumGroupData->mDescription.c_str());
|
||||
|
||||
if(IS_GROUP_ADMIN(groupData->mMeta.mSubscribeFlags))
|
||||
groupItemInfo.icon = FilesDefs::getIconFromQtResourcePath(":icons/png/forums.png");
|
||||
else if ((IS_GROUP_PGP_AUTHED(groupData->mMeta.mSignFlags)) || (IS_GROUP_MESSAGE_TRACKING(groupData->mMeta.mSignFlags)) )
|
||||
groupItemInfo.icon = FilesDefs::getIconFromQtResourcePath(":icons/png/forums-signed.png");
|
||||
if (!groupData->mMeta.mCircleId.isNull() )
|
||||
if (details.mRestrictedCircleId == details.mCircleId)
|
||||
groupItemInfo.icon = FilesDefs::getIconFromQtResourcePath(":icons/png/forums-red.png");
|
||||
else
|
||||
groupItemInfo.icon = FilesDefs::getIconFromQtResourcePath(":icons/png/forums-signed.png");
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user