CHUI-340 : WIP : Implement time update on all IM typing cases

master
Merov Linden 2012-09-20 20:48:20 -07:00
parent 1107803a5c
commit fc6bbee3f4
5 changed files with 17 additions and 9 deletions

View File

@ -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
{

View File

@ -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; }

View File

@ -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();

View File

@ -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;

View File

@ -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;
}