summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indra/newview/llimfloater.cpp17
-rw-r--r--indra/newview/llimfloater.h3
-rw-r--r--indra/newview/llimview.cpp2
3 files changed, 22 insertions, 0 deletions
diff --git a/indra/newview/llimfloater.cpp b/indra/newview/llimfloater.cpp
index 47a168e354..22d5b47ae4 100644
--- a/indra/newview/llimfloater.cpp
+++ b/indra/newview/llimfloater.cpp
@@ -947,3 +947,20 @@ void LLIMFloater::initIMFloater()
// init chat window type before user changed it in preferences
isChatMultiTab();
}
+
+//static
+void LLIMFloater::sRemoveTypingIndicator(const LLSD& data)
+{
+ LLUUID session_id = data["session_id"];
+ if (session_id.isNull()) return;
+
+ LLUUID from_id = data["from_id"];
+ if (gAgentID == from_id || LLUUID::null == from_id) return;
+
+ LLIMFloater* floater = LLIMFloater::findInstance(session_id);
+ if (!floater) return;
+
+ if (IM_NOTHING_SPECIAL != floater->mDialog) return;
+
+ floater->removeTypingIndicator();
+}
diff --git a/indra/newview/llimfloater.h b/indra/newview/llimfloater.h
index f90bc35c34..3184fd8e35 100644
--- a/indra/newview/llimfloater.h
+++ b/indra/newview/llimfloater.h
@@ -109,6 +109,9 @@ public:
static void initIMFloater();
+ //used as a callback on receiving new IM message
+ static void sRemoveTypingIndicator(const LLSD& data);
+
private:
// process focus events to set a currently active session
/* virtual */ void onFocusLost();
diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp
index bc35260983..b50d4674f7 100644
--- a/indra/newview/llimview.cpp
+++ b/indra/newview/llimview.cpp
@@ -1793,6 +1793,8 @@ LLIMMgr::LLIMMgr() :
{
mPendingInvitations = LLSD::emptyMap();
mPendingAgentListUpdates = LLSD::emptyMap();
+
+ LLIMModel::getInstance()->addNewMsgCallback(boost::bind(&LLIMFloater::sRemoveTypingIndicator, _1));
}
// Add a message to a session.