mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-02 06:06:10 -04:00
Fixed filter of description in group tree of forums, channels and posted.
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@7797 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
f7a08a53a1
commit
51825d851c
6 changed files with 114 additions and 5 deletions
|
@ -36,6 +36,7 @@ public:
|
|||
|
||||
public:
|
||||
QMap<RsGxsGroupId, QIcon> mIcon;
|
||||
QMap<RsGxsGroupId, QString> mDescription;
|
||||
};
|
||||
|
||||
/** Constructor */
|
||||
|
@ -181,7 +182,7 @@ void GxsChannelDialog::loadGroupSummaryToken(const uint32_t &token, std::list<Rs
|
|||
std::vector<RsGxsChannelGroup> groups;
|
||||
rsGxsChannels->getGroupData(token, groups);
|
||||
|
||||
/* Save groups to fill icons */
|
||||
/* Save groups to fill icons and description */
|
||||
GxsChannelGroupInfoData *channelData = new GxsChannelGroupInfoData;
|
||||
userdata = channelData;
|
||||
|
||||
|
@ -195,6 +196,10 @@ void GxsChannelDialog::loadGroupSummaryToken(const uint32_t &token, std::list<Rs
|
|||
image.loadFromData(group.mImage.mData, group.mImage.mSize, "PNG");
|
||||
channelData->mIcon[group.mMeta.mGroupId] = image;
|
||||
}
|
||||
|
||||
if (!group.mDescription.empty()) {
|
||||
channelData->mDescription[group.mMeta.mGroupId] = QString::fromUtf8(group.mDescription.c_str());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -209,6 +214,11 @@ void GxsChannelDialog::groupInfoToGroupItemInfo(const RsGroupMetaData &groupInfo
|
|||
return;
|
||||
}
|
||||
|
||||
QMap<RsGxsGroupId, QString>::const_iterator descriptionIt = channelData->mDescription.find(groupInfo.mGroupId);
|
||||
if (descriptionIt != channelData->mDescription.end()) {
|
||||
groupItemInfo.description = descriptionIt.value();
|
||||
}
|
||||
|
||||
QMap<RsGxsGroupId, QIcon>::const_iterator iconIt = channelData->mIcon.find(groupInfo.mGroupId);
|
||||
if (iconIt != channelData->mIcon.end()) {
|
||||
groupItemInfo.icon = iconIt.value();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue