From 6185c16a0af02c90625dec71119d12dec07bb056 Mon Sep 17 00:00:00 2001 From: Cho Date: Fri, 22 Feb 2013 20:54:58 +0000 Subject: CHUI-772 FIX User sees no notification of conversation activity not visible in long scrolling conversation list Added LLFLoaterIMContainer::isConversationItemWidgetvisible() which is now used in LLConversationViewSession::startFlashing() to flash chat toolbar button if out of view --- indra/newview/llfloaterimcontainer.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'indra/newview/llfloaterimcontainer.cpp') diff --git a/indra/newview/llfloaterimcontainer.cpp b/indra/newview/llfloaterimcontainer.cpp index c8088588da..0260f2b89e 100644 --- a/indra/newview/llfloaterimcontainer.cpp +++ b/indra/newview/llfloaterimcontainer.cpp @@ -1853,6 +1853,22 @@ void LLFloaterIMContainer::flashConversationItemWidget(const LLUUID& session_id, } } +bool LLFloaterIMContainer::isConversationItemWidgetVisible(const LLUUID& session_id) +{ + // find the conversation line item using the session_id + LLConversationViewSession* widget = dynamic_cast(get_ptr_in_map(mConversationsWidgets, session_id)); + + if (widget) + { + // check whether the widget is in the visible portion of the scroll container + LLRect widget_rect; + widget->localRectToOtherView(widget->getLocalRect(), &widget_rect, mConversationsRoot); + return (mConversationsRoot->getVisibleRect().overlaps(widget_rect)); + } + + return false; +} + void LLFloaterIMContainer::closeFloater(bool app_quitting/* = false*/) { // Always unminimize before trying to close. -- cgit v1.2.3 From 6194302a849431e84c046325d3cd19e92f62aa6f Mon Sep 17 00:00:00 2001 From: Cho Date: Fri, 22 Feb 2013 21:42:08 +0000 Subject: CHUI-772 FIX User sees no notification of conversation activity not visible in long scrolling conversation list Renamed LLFLoaterIMContainer::isConversationItemWidgetvisible() to isScrolledOutOfView() with opposite return value --- indra/newview/llfloaterimcontainer.cpp | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) (limited to 'indra/newview/llfloaterimcontainer.cpp') diff --git a/indra/newview/llfloaterimcontainer.cpp b/indra/newview/llfloaterimcontainer.cpp index 0260f2b89e..2d12d4ec21 100644 --- a/indra/newview/llfloaterimcontainer.cpp +++ b/indra/newview/llfloaterimcontainer.cpp @@ -1853,20 +1853,14 @@ void LLFloaterIMContainer::flashConversationItemWidget(const LLUUID& session_id, } } -bool LLFloaterIMContainer::isConversationItemWidgetVisible(const LLUUID& session_id) +bool LLFloaterIMContainer::isScrolledOutOfSight(LLConversationViewSession* conversation_item_widget) { - // find the conversation line item using the session_id - LLConversationViewSession* widget = dynamic_cast(get_ptr_in_map(mConversationsWidgets, session_id)); + llassert(conversation_item_widget != NULL); - if (widget) - { - // check whether the widget is in the visible portion of the scroll container - LLRect widget_rect; - widget->localRectToOtherView(widget->getLocalRect(), &widget_rect, mConversationsRoot); - return (mConversationsRoot->getVisibleRect().overlaps(widget_rect)); - } - - return false; + // check whether the widget is in the visible portion of the scroll container + LLRect widget_rect; + conversation_item_widget->localRectToOtherView(conversation_item_widget->getLocalRect(), &widget_rect, mConversationsRoot); + return !mConversationsRoot->getVisibleRect().overlaps(widget_rect); } void LLFloaterIMContainer::closeFloater(bool app_quitting/* = false*/) -- cgit v1.2.3