CHUI-385: Problem: When the new session was created with multiple participants the old conversation floater was being recycled. When the conversation floater was re-initialized it did not remove and update the chat messages. Resolution: When the conversation floater is recycled simply call reloadMessages().

meow-7.2.2
Gilbert Gonzales 2012-12-18 18:15:28 -08:00
parent 610b25ad3a
commit 13a619cb5f
3 changed files with 3 additions and 9 deletions

View File

@ -73,8 +73,7 @@ LLFloaterIMSession::LLFloaterIMSession(const LLUUID& session_id)
mTypingTimer(),
mTypingTimeoutTimer(),
mPositioned(false),
mSessionInitialized(false),
mStartConferenceInSameFloater(false)
mSessionInitialized(false)
{
mIsNearbyChat = false;
@ -462,8 +461,6 @@ void LLFloaterIMSession::addP2PSessionParticipants(const LLSD& notification, con
return;
}
mStartConferenceInSameFloater = true;
LLVoiceChannel* voice_channel = LLIMModel::getInstance()->getVoiceChannel(mSessionID);
// first check whether this is a voice session

View File

@ -127,8 +127,6 @@ public:
//used as a callback on receiving new IM message
static void sRemoveTypingIndicator(const LLSD& data);
static void onIMChicletCreated(const LLUUID& session_id);
bool getStartConferenceInSameFloater() const { return mStartConferenceInSameFloater; }
const LLUUID& getOtherParticipantUUID() {return mOtherParticipantUUID;}
static boost::signals2::connection setIMFloaterShowedCallback(const floater_showed_signal_t::slot_type& cb);
@ -188,8 +186,6 @@ private:
bool mSessionInitialized;
LLSD mQueuedMsgsForInit;
bool mStartConferenceInSameFloater;
uuid_vec_t mInvitedParticipants;
// connection to voice channel state change signal

View File

@ -2699,12 +2699,13 @@ LLUUID LLIMMgr::addSession(
{
LLFloaterIMSession* im_floater = LLFloaterIMSession::findInstance(floater_id);
if (im_floater && im_floater->getStartConferenceInSameFloater())
if (im_floater)
{
// The IM floater should be initialized with a new session_id
// so that it is found by that id when creating a chiclet in LLFloaterIMSession::onIMChicletCreated,
// and a new floater is not created.
im_floater->initIMSession(session_id);
im_floater->reloadMessages();
}
}