summaryrefslogtreecommitdiff
path: root/indra/newview/llfloaterimsession.cpp
diff options
context:
space:
mode:
authorRider Linden <rider@lindenlab.com>2018-06-21 09:13:19 -0700
committerRider Linden <rider@lindenlab.com>2018-06-21 09:13:19 -0700
commitf07dc421e81d945531dc6f4befc19ea4fe4b9a47 (patch)
tree7ac8fa1fbfad64c616161488a5d0be10c1eaba34 /indra/newview/llfloaterimsession.cpp
parent8b3957b310afa23e543c3eb33aca9131dba52b31 (diff)
parentdc07de2f4a4c49d1877bf743b6f0d209392f6eb6 (diff)
Merge
Diffstat (limited to 'indra/newview/llfloaterimsession.cpp')
-rw-r--r--indra/newview/llfloaterimsession.cpp25
1 files changed, 12 insertions, 13 deletions
diff --git a/indra/newview/llfloaterimsession.cpp b/indra/newview/llfloaterimsession.cpp
index 6623ce0f80..a4ab1af9a8 100644
--- a/indra/newview/llfloaterimsession.cpp
+++ b/indra/newview/llfloaterimsession.cpp
@@ -82,8 +82,7 @@ LLFloaterIMSession::LLFloaterIMSession(const LLUUID& session_id)
mPositioned(false),
mSessionInitialized(false),
mMeTypingTimer(),
- mOtherTypingTimer(),
- mImInfo()
+ mOtherTypingTimer()
{
mIsNearbyChat = false;
@@ -125,7 +124,7 @@ void LLFloaterIMSession::refresh()
if (mOtherTyping && mOtherTypingTimer.getElapsedTimeF32() > OTHER_TYPING_TIMEOUT)
{
LL_DEBUGS("TypingMsgs") << "Received: is typing cleared due to timeout" << LL_ENDL;
- removeTypingIndicator(mImInfo);
+ removeTypingIndicator(mImFromId);
mOtherTyping = false;
}
@@ -1006,19 +1005,19 @@ void LLFloaterIMSession::setTyping(bool typing)
}
}
-void LLFloaterIMSession::processIMTyping(const LLIMInfo* im_info, BOOL typing)
+void LLFloaterIMSession::processIMTyping(const LLUUID& from_id, BOOL typing)
{
LL_DEBUGS("TypingMsgs") << "typing=" << typing << LL_ENDL;
if ( typing )
{
// other user started typing
- addTypingIndicator(im_info);
+ addTypingIndicator(from_id);
mOtherTypingTimer.reset();
}
else
{
// other user stopped typing
- removeTypingIndicator(im_info);
+ removeTypingIndicator(from_id);
}
}
@@ -1218,7 +1217,7 @@ BOOL LLFloaterIMSession::inviteToSession(const uuid_vec_t& ids)
return is_region_exist;
}
-void LLFloaterIMSession::addTypingIndicator(const LLIMInfo* im_info)
+void LLFloaterIMSession::addTypingIndicator(const LLUUID& from_id)
{
/* Operation of "<name> is typing" state machine:
Not Typing state:
@@ -1248,35 +1247,35 @@ Note: OTHER_TYPING_TIMEOUT must be > ME_TYPING_TIMEOUT for proper operation of t
*/
// We may have lost a "stop-typing" packet, don't add it twice
- if (im_info && !mOtherTyping)
+ if (from_id.notNull() && !mOtherTyping)
{
mOtherTyping = true;
mOtherTypingTimer.reset();
// Save im_info so that removeTypingIndicator can be properly called because a timeout has occurred
- mImInfo = im_info;
+ mImFromId = from_id;
// Update speaker
LLIMSpeakerMgr* speaker_mgr = LLIMModel::getInstance()->getSpeakerManager(mSessionID);
if ( speaker_mgr )
{
- speaker_mgr->setSpeakerTyping(im_info->mFromID, TRUE);
+ speaker_mgr->setSpeakerTyping(from_id, TRUE);
}
}
}
-void LLFloaterIMSession::removeTypingIndicator(const LLIMInfo* im_info)
+void LLFloaterIMSession::removeTypingIndicator(const LLUUID& from_id)
{
if (mOtherTyping)
{
mOtherTyping = false;
- if (im_info)
+ if (from_id.notNull())
{
// Update speaker
LLIMSpeakerMgr* speaker_mgr = LLIMModel::getInstance()->getSpeakerManager(mSessionID);
if (speaker_mgr)
{
- speaker_mgr->setSpeakerTyping(im_info->mFromID, FALSE);
+ speaker_mgr->setSpeakerTyping(from_id, FALSE);
}
}
}