Example #1
0
void SessionLayout::_UpdateGroupMembersList()
{
	if (!m_pRightContainer
		|| !m_pGroupMemberList)
	{
		return;
	}
	module::UserInfoEntityVec groupUserVec;
	if (!module::getGroupListModule()->getGroupUserVecBySId(m_sId, groupUserVec))
	{
		return;
	}

	for (std::string sid : groupUserVec)
	{
		_AddGroupMemberToList(sid);
	}
	m_pGroupMemberList->SortItems(GroupMemberListItemCompareFunc, 0);
}
Example #2
0
void SessionLayout::_UpdateGroupMembersList()
{
	if (!m_pRightContainer
		|| !m_pGroupMemberList)
	{
		return;
	}
	module::GroupInfoEntity groupInfo;
	if (!module::getGroupListModule()->getGroupInfoBySId(m_sId, groupInfo))
	{
		LOG__(ERR, _T("Can't find the group id:%s"),util::stringToCString(m_sId));
		return;
	}
	m_pGroupMemberList->RemoveAll();
	for (std::string sid : groupInfo.groupMemeberList)
	{
		_AddGroupMemberToList(sid,groupInfo.creatorId == sid);
	}
	m_pGroupMemberList->SortItems(GroupMemberListItemCompareFunc, 0);
}