diff options
| author | Merov Linden <merov@lindenlab.com> | 2012-09-20 20:48:20 -0700 | 
|---|---|---|
| committer | Merov Linden <merov@lindenlab.com> | 2012-09-20 20:48:20 -0700 | 
| commit | fc6bbee3f4ba1abba2956ee92f7ac7ba01d0f59b (patch) | |
| tree | 542b22f9dfcf0b24c6af996b2b7015e3a30c5280 | |
| parent | 1107803a5c6da07cd5171f06afc0490f3eca7bf7 (diff) | |
CHUI-340 : WIP : Implement time update on all IM typing cases
| -rw-r--r-- | indra/newview/llconversationmodel.cpp | 9 | ||||
| -rwxr-xr-x | indra/newview/llconversationmodel.h | 1 | ||||
| -rw-r--r-- | indra/newview/llimfloater.cpp | 4 | ||||
| -rw-r--r-- | indra/newview/llnearbychat.cpp | 5 | ||||
| -rw-r--r-- | indra/newview/llparticipantlist.cpp | 7 | 
5 files changed, 17 insertions, 9 deletions
diff --git a/indra/newview/llconversationmodel.cpp b/indra/newview/llconversationmodel.cpp index b39b997a55..31f9ca6a32 100644 --- a/indra/newview/llconversationmodel.cpp +++ b/indra/newview/llconversationmodel.cpp @@ -167,6 +167,15 @@ void LLConversationItemSession::setParticipantIsModerator(const LLUUID& particip  	}  } +void LLConversationItemSession::setParticipantTimeNow(const LLUUID& participant_id) +{ +	LLConversationItemParticipant* participant = findParticipant(participant_id); +	if (participant) +	{ +		participant->setTimeNow(); +	} +} +  // The time of activity of a session is the time of the most recent participation  const bool LLConversationItemSession::getTime(F64& time) const  { diff --git a/indra/newview/llconversationmodel.h b/indra/newview/llconversationmodel.h index f3f99b5575..e2c88785a2 100755 --- a/indra/newview/llconversationmodel.h +++ b/indra/newview/llconversationmodel.h @@ -149,6 +149,7 @@ public:  	void setParticipantIsMuted(const LLUUID& participant_id, bool is_muted);  	void setParticipantIsModerator(const LLUUID& participant_id, bool is_moderator); +	void setParticipantTimeNow(const LLUUID& participant_id);  	bool isLoaded() { return mIsLoaded; } diff --git a/indra/newview/llimfloater.cpp b/indra/newview/llimfloater.cpp index fbc1b8e7fe..8268764816 100644 --- a/indra/newview/llimfloater.cpp +++ b/indra/newview/llimfloater.cpp @@ -907,9 +907,11 @@ void LLIMFloater::updateMessages()  				chat.mText = message;  			} -			// Merov debug +			// Update the participant activity time +			mParticipantList->setParticipantTimeNow(from_id);  			llinfos << "Merov debug : LLIMFloater::updateMessages, session = " << mSessionID << ", from = " << msg["from"].asString() << ", uuid = " << msg["from_id"].asString() << ", date = " << LLFrameTimer::getElapsedSeconds() << llendl; +			// Add the message to the chat log  			appendMessage(chat);  			mLastMessageIndex = msg["index"].asInteger(); diff --git a/indra/newview/llnearbychat.cpp b/indra/newview/llnearbychat.cpp index bf47aa06a8..0d52a9e14c 100644 --- a/indra/newview/llnearbychat.cpp +++ b/indra/newview/llnearbychat.cpp @@ -233,9 +233,10 @@ void LLNearbyChat::loadHistory()   			gCacheName->getUUID(legacy_name, from_id);   		} -		// Merov debug +		// Update the participant activity time +		mParticipantList->setParticipantTimeNow(from_id);  		llinfos << "Merov debug : LLNearbyChat::loadHistory, session = " << mSessionID << ", from = " << msg[IM_FROM].asString() << ", uuid = " << msg[IM_FROM_ID].asString() << ", date = " << LLFrameTimer::getElapsedSeconds() << llendl; - +		  		LLChat chat;  		chat.mFromName = from;  		chat.mFromID = from_id; diff --git a/indra/newview/llparticipantlist.cpp b/indra/newview/llparticipantlist.cpp index 9f470a735e..6283c8f296 100644 --- a/indra/newview/llparticipantlist.cpp +++ b/indra/newview/llparticipantlist.cpp @@ -592,12 +592,7 @@ bool LLParticipantList::onSpeakerUpdateEvent(LLPointer<LLOldEvents::LLEvent> eve  	if ( evt_data.has("id") )  	{  		LLUUID participant_id = evt_data["id"]; -		LLConversationItemParticipant* participant = findParticipant(participant_id); -		if (participant) -		{ -			participant->setTimeNow(); -		} -		llinfos << "Merov debug : onSpeakerUpdateEvent, session = " << mUUID << ", uuid = " << participant_id << ", date = " << LLFrameTimer::getElapsedSeconds() << llendl; +		setParticipantTimeNow(participant_id);  	}  	return true;  }  | 
