fixed a few bugs

This commit is contained in:
csoler 2020-03-21 17:44:58 +01:00
parent b8ec91aac5
commit 05afc40804
No known key found for this signature in database
GPG Key ID: 7BCA522266C0804C
4 changed files with 19 additions and 5 deletions

View File

@ -237,9 +237,14 @@ void PostedDialog::groupInfoToGroupItemInfo(const RsGxsGenericGroupData *groupDa
return;
}
if(postedGroupData->mGroupImage.mSize > 0)
{
QPixmap image;
GxsIdDetails::loadPixmapFromData(postedGroupData->mGroupImage.mData, postedGroupData->mGroupImage.mSize, image,GxsIdDetails::ORIGINAL);
groupItemInfo.icon = image;
}
else
groupItemInfo.icon = QIcon(":icons/png/postedlinks.png");
groupItemInfo.description = QString::fromUtf8(postedGroupData->mDescription.c_str());
groupItemInfo.icon = image;
}

View File

@ -951,7 +951,9 @@ void GxsGroupFrameDialog::insertGroupsData(const std::list<RsGxsGenericGroupData
subList.push_back(groupItemInfo); /* subscribed group */
}
else
{
popMap.insert(std::make_pair(g->mMeta.mLastPost, groupItemInfo)); /* rate the others by time of last post */
}
}
/* iterate backwards through popMap - take the top 5 or 10% of list */

View File

@ -401,11 +401,16 @@ void GxsChannelDialog::groupInfoToGroupItemInfo(const RsGxsGenericGroupData *gro
return;
}
QPixmap image;
GxsIdDetails::loadPixmapFromData(channelGroupData->mImage.mData, channelGroupData->mImage.mSize, image,GxsIdDetails::ORIGINAL);
if(channelGroupData->mImage.mSize > 0)
{
QPixmap image;
GxsIdDetails::loadPixmapFromData(channelGroupData->mImage.mData, channelGroupData->mImage.mSize, image,GxsIdDetails::ORIGINAL);
groupItemInfo.icon = image;
}
else
groupItemInfo.icon = QIcon(":icons/png/channel.png");
groupItemInfo.description = QString::fromUtf8(channelGroupData->mDescription.c_str());
groupItemInfo.icon = image;
}
TurtleRequestId GxsChannelDialog::distantSearch(const QString& search_string)

View File

@ -237,7 +237,9 @@ void GxsForumsDialog::groupInfoToGroupItemInfo(const RsGxsGenericGroupData *grou
groupItemInfo.description = QString::fromUtf8(forumGroupData->mDescription.c_str());
if ((IS_GROUP_PGP_AUTHED(groupData->mMeta.mSignFlags)) || (IS_GROUP_MESSAGE_TRACKING(groupData->mMeta.mSignFlags)) )
if(IS_GROUP_ADMIN(groupData->mMeta.mSubscribeFlags))
groupItemInfo.icon = QIcon(":images/konv_message2.png");
else if ((IS_GROUP_PGP_AUTHED(groupData->mMeta.mSignFlags)) || (IS_GROUP_MESSAGE_TRACKING(groupData->mMeta.mSignFlags)) )
groupItemInfo.icon = QIcon(":icons/png/forums-signed.png");
}