FIRE-3248: Disable add friend button on IM floater after avatar has been added as friend
parent
495345c297
commit
f899864008
|
|
@ -68,6 +68,7 @@
|
|||
// </FS:Zi>
|
||||
#include "llfloaterreg.h"
|
||||
#include "llnotificationmanager.h"
|
||||
#include "llimfloater.h"
|
||||
|
||||
///----------------------------------------------------------------------------
|
||||
/// Local function declarations, constants, enums, and typedefs
|
||||
|
|
@ -879,6 +880,15 @@ void LLAvatarTracker::formFriendship(const LLUUID& id)
|
|||
at.mBuddyInfo[id] = buddy_info;
|
||||
at.addChangedMask(LLFriendObserver::ADD, id);
|
||||
at.notifyObservers();
|
||||
|
||||
// <FS:Ansariel> FIRE-3248: Disable add friend button on IM floater if friendship request accepted
|
||||
LLUUID im_session_id = LLIMMgr::computeSessionID(IM_NOTHING_SPECIAL, id);
|
||||
LLIMFloater* im_floater = LLIMFloater::findInstance(im_session_id);
|
||||
if (im_floater)
|
||||
{
|
||||
im_floater->setEnableAddFriendButton(FALSE);
|
||||
}
|
||||
// </FS:Ansariel>
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -896,6 +906,15 @@ void LLAvatarTracker::processTerminateFriendship(LLMessageSystem* msg, void**)
|
|||
at.addChangedMask(LLFriendObserver::REMOVE, id);
|
||||
delete buddy;
|
||||
at.notifyObservers();
|
||||
|
||||
// <FS:Ansariel> FIRE-3248: Disable add friend button on IM floater if friendship request accepted
|
||||
LLUUID im_session_id = LLIMMgr::computeSessionID(IM_NOTHING_SPECIAL, id);
|
||||
LLIMFloater* im_floater = LLIMFloater::findInstance(im_session_id);
|
||||
if (im_floater)
|
||||
{
|
||||
im_floater->setEnableAddFriendButton(TRUE);
|
||||
}
|
||||
// </FS:Ansariel>
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1801,3 +1801,10 @@ BOOL LLIMFloater::enableViewerVersionCallback(const LLSD& notification,const LLS
|
|||
return result;
|
||||
}
|
||||
// </FS:Zi>
|
||||
|
||||
// <FS:Ansariel> FIRE-3248: Disable add friend button on IM floater if friendship request accepted
|
||||
void LLIMFloater::setEnableAddFriendButton(BOOL enabled)
|
||||
{
|
||||
getChild<LLButton>("add_friend_btn")->setEnabled(enabled);
|
||||
}
|
||||
// </FS:Ansariel>
|
||||
|
|
@ -130,6 +130,9 @@ public:
|
|||
|
||||
virtual LLTransientFloaterMgr::ETransientGroup getGroup() { return LLTransientFloaterMgr::IM; }
|
||||
|
||||
// <FS:Ansariel> FIRE-3248: Disable add friend button on IM floater if friendship request accepted
|
||||
void setEnableAddFriendButton(BOOL enabled);
|
||||
|
||||
protected:
|
||||
/* virtual */
|
||||
void onClickCloseBtn();
|
||||
|
|
|
|||
Loading…
Reference in New Issue