From 222dfaef0aa16ced2fd6285763467e5bfa8ed574 Mon Sep 17 00:00:00 2001 From: Igor Borovkov Date: Mon, 14 Dec 2009 16:43:34 +0200 Subject: fixed EXT-3372 [BSI] Typing notification in IM displayed although Resident isn't typing Added explicit resetting of IM floater's title as it was done in 1.23 --HG-- branch : product-engine --- indra/newview/llimfloater.cpp | 17 +++++++++++++++++ indra/newview/llimfloater.h | 3 +++ indra/newview/llimview.cpp | 2 ++ 3 files changed, 22 insertions(+) (limited to 'indra/newview') 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. -- cgit v1.2.3