diff options
| author | Igor Borovkov <iborovkov@productengine.com> | 2009-12-17 17:49:08 +0200 |
|---|---|---|
| committer | Igor Borovkov <iborovkov@productengine.com> | 2009-12-17 17:49:08 +0200 |
| commit | 30f3397e35df30d444f17b00c43fb6135ddc0604 (patch) | |
| tree | fc1b1034ad98219b9c64e5c44256be70dcd0081a /indra/newview/llsyswellwindow.cpp | |
| parent | fd83b1fa11f3f84113560ce4ba6f748af64b0361 (diff) | |
fix. EXT-2884 Initiation of a voice call should not bring text chat (p2p, ad-hoc, group)
correct chiclet handling functionality in IM when im session is started as voice call
--HG--
branch : product-engine
Diffstat (limited to 'indra/newview/llsyswellwindow.cpp')
| -rw-r--r-- | indra/newview/llsyswellwindow.cpp | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/indra/newview/llsyswellwindow.cpp b/indra/newview/llsyswellwindow.cpp index feaa22e7f0..3769ddb1cc 100644 --- a/indra/newview/llsyswellwindow.cpp +++ b/indra/newview/llsyswellwindow.cpp @@ -32,6 +32,8 @@ #include "llviewerprecompiledheaders.h" // must be first include +#include "llagent.h" + #include "llflatlistview.h" #include "llfloaterreg.h" #include "llnotifications.h" @@ -857,4 +859,36 @@ void LLIMWellWindow::removeObjectRow(const LLUUID& object_id) } } + +void LLIMWellWindow::addIMRow(const LLUUID& session_id) +{ + if (hasIMRow(session_id)) return; + + LLIMModel* im_model = LLIMModel::getInstance(); + addIMRow(session_id, 0, im_model->getName(session_id), im_model->getOtherParticipantID(session_id)); + reshapeWindow(); +} + +bool LLIMWellWindow::hasIMRow(const LLUUID& session_id) +{ + return mMessageList->getItemByValue(session_id); +} + +void LLIMWellWindow::onNewIM(const LLSD& data) +{ + LLUUID from_id = data["from_id"]; + if (from_id.isNull() || gAgentID == from_id) return; + + LLUUID session_id = data["session_id"]; + if (session_id.isNull()) return; + + if (!gIMMgr->isVoiceCall(session_id)) return; + + if (hasIMRow(session_id)) return; + + //first real message, time to create chiclet + addIMRow(session_id); +} + + // EOF |
