Refactor code for controlling friendship button in IM floater
parent
5cca3bcd5d
commit
5b46c7e2d2
|
|
@ -681,6 +681,7 @@ void FSFloaterIM::changed(U32 mask)
|
|||
bool is_online = LLAvatarTracker::instance().isBuddyOnline(mOtherParticipantUUID);
|
||||
getChild<LLButton>("teleport_btn")->setEnabled(is_online);
|
||||
getChild<LLButton>("call_btn")->setEnabled(is_online);
|
||||
getChild<LLButton>("add_friend_btn")->setEnabled(FALSE);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -688,6 +689,7 @@ void FSFloaterIM::changed(U32 mask)
|
|||
// know about their online status anymore
|
||||
getChild<LLButton>("teleport_btn")->setEnabled(TRUE);
|
||||
getChild<LLButton>("call_btn")->setEnabled(TRUE);
|
||||
getChild<LLButton>("add_friend_btn")->setEnabled(TRUE);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -2091,13 +2093,6 @@ BOOL FSFloaterIM::enableViewerVersionCallback(const LLSD& notification,const LLS
|
|||
}
|
||||
// </FS:Zi>
|
||||
|
||||
// <FS:Ansariel> FIRE-3248: Disable add friend button on IM floater if friendship request accepted
|
||||
void FSFloaterIM::setEnableAddFriendButton(BOOL enabled)
|
||||
{
|
||||
getChild<LLButton>("add_friend_btn")->setEnabled(enabled);
|
||||
}
|
||||
// </FS:Ansariel>
|
||||
|
||||
// <FS:CR> FIRE-11734
|
||||
//static
|
||||
void FSFloaterIM::clearAllOpenHistories()
|
||||
|
|
|
|||
|
|
@ -139,9 +139,6 @@ public:
|
|||
static void onNewIMReceived(const LLUUID& session_id);
|
||||
|
||||
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);
|
||||
|
||||
static boost::signals2::connection setIMFloaterShowedCallback(const floater_showed_signal_t::slot_type& cb);
|
||||
static floater_showed_signal_t sIMFloaterShowedSignal;
|
||||
|
|
|
|||
|
|
@ -56,7 +56,6 @@
|
|||
|
||||
// Firestorm includes
|
||||
#include "fscommon.h"
|
||||
#include "fsfloaterim.h"
|
||||
#include "fsfloaternearbychat.h"
|
||||
#include "fskeywords.h"
|
||||
#include "lggcontactsets.h"
|
||||
|
|
@ -889,17 +888,6 @@ 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);
|
||||
// <FS:Ansariel> [FS communication UI]
|
||||
FSFloaterIM* im_floater = FSFloaterIM::findInstance(im_session_id);
|
||||
// </FS:Ansariel> [FS communication UI]
|
||||
if (im_floater)
|
||||
{
|
||||
im_floater->setEnableAddFriendButton(FALSE);
|
||||
}
|
||||
// </FS:Ansariel>
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -917,17 +905,6 @@ 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);
|
||||
// <FS:Ansariel> [FS communication UI]
|
||||
FSFloaterIM* im_floater = FSFloaterIM::findInstance(im_session_id);
|
||||
// </FS:Ansariel> [FS communication UI]
|
||||
if (im_floater)
|
||||
{
|
||||
im_floater->setEnableAddFriendButton(TRUE);
|
||||
}
|
||||
// </FS:Ansariel>
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue