diff options
| author | Merov Linden <merov@lindenlab.com> | 2012-10-17 19:33:09 -0700 |
|---|---|---|
| committer | Merov Linden <merov@lindenlab.com> | 2012-10-17 19:33:09 -0700 |
| commit | ec9260701feaa9ae1453c57f0f70449bb9b60af2 (patch) | |
| tree | 9a6e74ee503c956dc8f13851f3ff0da712861b08 /indra/newview/llimview.cpp | |
| parent | e56145176875a09dc9e1524a47bcc1259582c896 (diff) | |
| parent | 49ad7fd4b57cec635c557070be02556094e90ff6 (diff) | |
Pull merge from richard/viewer-chui
Diffstat (limited to 'indra/newview/llimview.cpp')
| -rw-r--r-- | indra/newview/llimview.cpp | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index b45903835a..115da54ec8 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -647,8 +647,6 @@ void LLIMModel::processSessionInitializedReply(const LLUUID& old_session_id, con { mId2SessionMap.erase(old_session_id); mId2SessionMap[new_session_id] = session; - - gIMMgr->notifyObserverSessionIDUpdated(old_session_id, new_session_id); } LLIMFloater* im_floater = LLIMFloater::findInstance(old_session_id); @@ -657,6 +655,11 @@ void LLIMModel::processSessionInitializedReply(const LLUUID& old_session_id, con im_floater->sessionInitReplyReceived(new_session_id); } + if (old_session_id != new_session_id) + { + gIMMgr->notifyObserverSessionIDUpdated(old_session_id, new_session_id); + } + // auto-start the call on session initialization? if (session->mStartCallOnInitialize) { @@ -2650,10 +2653,17 @@ LLUUID LLIMMgr::addSession( } } + //Notify observers that a session was added if (new_session) { LLIMModel::getInstance()->newSession(session_id, name, dialog, other_participant_id, ids, voice); } + //Notifies observers that the session was already added + else + { + std::string session_name = LLIMModel::getInstance()->getName(session_id); + LLIMMgr::getInstance()->notifyObserverSessionActivated(session_id, session_name, other_participant_id); + } //we don't need to show notes about online/offline, mute/unmute users' statuses for existing sessions if (!new_session) return session_id; @@ -2956,6 +2966,14 @@ void LLIMMgr::notifyObserverSessionAdded(const LLUUID& session_id, const std::st } } +void LLIMMgr::notifyObserverSessionActivated(const LLUUID& session_id, const std::string& name, const LLUUID& other_participant_id) +{ + for (session_observers_list_t::iterator it = mSessionObservers.begin(); it != mSessionObservers.end(); it++) + { + (*it)->sessionActivated(session_id, name, other_participant_id); + } +} + void LLIMMgr::notifyObserverSessionVoiceOrIMStarted(const LLUUID& session_id) { for (session_observers_list_t::iterator it = mSessionObservers.begin(); it != mSessionObservers.end(); it++) |
