From 8c20b1e002e2056b27b3bc4613cf077a4a6d3774 Mon Sep 17 00:00:00 2001 From: AlexanderP ProductEngine Date: Thu, 14 Feb 2013 18:33:07 +0200 Subject: CHUI-773 Conversation line item does not flash for unselected conversation when Flash Toolbar Button preference is selected: add flashing in "toast" case when session floater is open but not selected --- indra/newview/llimview.cpp | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index cdf6cb6252..cf6a215970 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -213,16 +213,14 @@ void on_new_message(const LLSD& msg) //conversation floater not focused (visible or not) bool conversation_floater_not_focused = conversation_floater_is_closed || !im_box->hasFocus(); - - // Skip toasting and flashing if we have open window of IM with this session id - if (session_floater - && session_floater->isInVisibleChain() - && !session_floater->isMinimized() - && !(session_floater->getHost() && session_floater->getHost()->isMinimized())) - { - return; - } - if ("toast" == action) + // sess. floater is open + bool session_floater_is_open = + session_floater + && session_floater->isInVisibleChain() + && !session_floater->isMinimized() + && !(session_floater->getHost() && session_floater->getHost()->isMinimized()); + + if ("toast" == action && !session_floater_is_open) { //User is not focused on conversation containing the message if(session_floater_not_focused) @@ -254,7 +252,7 @@ void on_new_message(const LLSD& msg) { if (conversation_floater_not_focused) { - if(session_floater_not_focused && !gAgent.isDoNotDisturb()) + if(!session_floater_is_open && !gAgent.isDoNotDisturb()) { //User is not focused on conversation containing the message gToolBarView->flashCommand(LLCommandId("chat"), true); @@ -273,7 +271,7 @@ void on_new_message(const LLSD& msg) } } - else if("openconversations" == action) + else if("openconversations" == action && !session_floater_is_open) { //User is not focused on conversation containing the message if(session_floater_not_focused) -- cgit v1.2.3