From 44b681f5db9435f98d52525621aa98b0a8ed3063 Mon Sep 17 00:00:00 2001
From: Cho <cho@lindenlab.com>
Date: Tue, 29 Jan 2013 00:16:40 +0000
Subject: [PATCH] CHUI-644 FIX [CHUIBUG]Received IM's Don't Always Appear in
 Communication Console Immediately. Removed new code from on_new_message in
 LLIMView and instead, changed condition in LLFloaterIMSession::newIMCallback
 to update messages whenever the floater is visible

---
 indra/newview/llfloaterimsession.cpp | 2 +-
 indra/newview/llimview.cpp           | 8 +-------
 2 files changed, 2 insertions(+), 8 deletions(-)

diff --git a/indra/newview/llfloaterimsession.cpp b/indra/newview/llfloaterimsession.cpp
index a08479c7be4..31d2c67e29a 100644
--- a/indra/newview/llfloaterimsession.cpp
+++ b/indra/newview/llfloaterimsession.cpp
@@ -162,7 +162,7 @@ void LLFloaterIMSession::newIMCallback(const LLSD& data)
 		LLFloaterIMSession* floater = LLFloaterReg::findTypedInstance<LLFloaterIMSession>("impanel", session_id);
 
         // update if visible, otherwise will be updated when opened
-		if (floater && (floater->getHost()? floater->hasFocus() : floater->getVisible()))
+		if (floater && floater->isInVisibleChain())
 		{
 			floater->updateMessages();
 		}
diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp
index acbf5fcde4a..ffbb8471c2f 100644
--- a/indra/newview/llimview.cpp
+++ b/indra/newview/llimview.cpp
@@ -239,14 +239,8 @@ void on_new_message(const LLSD& msg)
                 {
                     LLAvatarNameCache::get(participant_id, boost::bind(&on_avatar_name_cache_toast, _1, _2, msg));
                 }
-
-				// Make sure the message actually appears, without having to click on the conversation
-				if(!conversation_floater_is_closed)
-				{
-					im_box->selectConversation(session_id);
-				}
             }
-        }
+		}
     }
 
     else if ("flash" == action)
-- 
GitLab