void SessionList::OnUserPhotoReady(PhotoType type, const std::string& accid, const std::wstring &photo_path) { if (type == kUser || type == kTeam) { SessionItem* item = (SessionItem*)session_list_->FindSubControl(nbase::UTF8ToUTF16(accid)); if (item) item->FindSubControl(L"head_image")->SetBkImage(photo_path); } }
void SessionList::OnTeamNameChange(const nim::TeamInfo& team_info) { SessionItem* item = (SessionItem*)session_list_->FindSubControl(nbase::UTF8ToUTF16(team_info.GetTeamID())); if (item) ((Label*)item->FindSubControl(L"label_name"))->SetUTF8Text(team_info.GetName()); }