When you ask someone to be your friend, it now shows immediately in your friends list. (as pending of course)
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/uni@13526 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
@@ -332,6 +332,7 @@ namespace Online{
|
||||
irr::core::stringw info_text("");
|
||||
if(m_success)
|
||||
{
|
||||
CurrentUser::get()->getProfile()->addFriend(id);
|
||||
ProfileManager::get()->getProfileByID(id)->setRelationInfo(new Profile::RelationInfo(_("Today"), false, true, false));
|
||||
OnlineProfileFriends::getInstance()->refreshFriendsList();
|
||||
info_text = _("Friend request send!");
|
||||
|
||||
@@ -179,6 +179,15 @@ namespace Online{
|
||||
|
||||
// ============================================================================
|
||||
|
||||
void Profile::addFriend( const uint32_t id)
|
||||
{
|
||||
assert (m_has_fetched_friends);
|
||||
//FIXME check if it's not already in there
|
||||
m_friends.push_back(id);
|
||||
}
|
||||
|
||||
// ============================================================================
|
||||
|
||||
void Profile::deleteRelationalInfo()
|
||||
{
|
||||
delete m_relation_info;
|
||||
|
||||
@@ -108,6 +108,7 @@ namespace Online{
|
||||
bool isFriend() const { return m_is_friend; }
|
||||
void setFriend() { m_is_friend = true; }
|
||||
void removeFriend(const uint32_t id);
|
||||
void addFriend(const uint32_t id);
|
||||
void deleteRelationalInfo();
|
||||
RelationInfo * getRelationInfo() { return m_relation_info; }
|
||||
void setRelationInfo(RelationInfo * r){ delete m_relation_info; m_relation_info = r;}
|
||||
|
||||
Reference in New Issue
Block a user