diff options
author | Graham Linden <graham@lindenlab.com> | 2018-06-21 17:39:13 +0100 |
---|---|---|
committer | Graham Linden <graham@lindenlab.com> | 2018-06-21 17:39:13 +0100 |
commit | 2db71067f21f31ce19ef99a3f4b4404f24b2ad0d (patch) | |
tree | 5a6294e8beb8d9b50e973a962624bf47f234e045 /indra/newview/llfloaterimsession.cpp | |
parent | 3ed3cfce56e9d5c934db350f36ab13c51e3330c1 (diff) | |
parent | dc07de2f4a4c49d1877bf743b6f0d209392f6eb6 (diff) |
Merge 5.1.7
Diffstat (limited to 'indra/newview/llfloaterimsession.cpp')
-rw-r--r-- | indra/newview/llfloaterimsession.cpp | 25 |
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); } } } |