diff options
author | Cho <cho@lindenlab.com> | 2013-02-22 21:42:08 +0000 |
---|---|---|
committer | Cho <cho@lindenlab.com> | 2013-02-22 21:42:08 +0000 |
commit | 6194302a849431e84c046325d3cd19e92f62aa6f (patch) | |
tree | c6139104619233746a5aa9c398d7c358895c00cf /indra/newview | |
parent | 6185c16a0af02c90625dec71119d12dec07bb056 (diff) |
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
Diffstat (limited to 'indra/newview')
-rwxr-xr-x | indra/newview/llconversationview.cpp | 11 | ||||
-rw-r--r-- | indra/newview/llfloaterimcontainer.cpp | 18 | ||||
-rw-r--r-- | indra/newview/llfloaterimcontainer.h | 2 |
3 files changed, 10 insertions, 21 deletions
diff --git a/indra/newview/llconversationview.cpp b/indra/newview/llconversationview.cpp index 850668388f..73b2c6f88c 100755 --- a/indra/newview/llconversationview.cpp +++ b/indra/newview/llconversationview.cpp @@ -116,15 +116,10 @@ void LLConversationViewSession::startFlashing() mFlashStarted = true; mFlashTimer->startFlashing(); - // get session id - LLConversationItem* vmi = dynamic_cast<LLConversationItem*>(getViewModelItem()); - if (vmi) + // flash chat toolbar button if scrolled out of sight (because flashing will not be visible) + if (mContainer->isScrolledOutOfSight(this)) { - // flash chat toolbar button if scrolled out of view (because flashing will not be visible) - if (!mContainer->isConversationItemWidgetVisible(vmi->getUUID())) - { - gToolBarView->flashCommand(LLCommandId("chat"), true); - } + gToolBarView->flashCommand(LLCommandId("chat"), true); } } } 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<LLConversationViewSession*>(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*/) diff --git a/indra/newview/llfloaterimcontainer.h b/indra/newview/llfloaterimcontainer.h index 156f11f14e..5ba29b8cfb 100644 --- a/indra/newview/llfloaterimcontainer.h +++ b/indra/newview/llfloaterimcontainer.h @@ -185,7 +185,7 @@ public: void updateSpeakBtnState(); static bool isConversationLoggingAllowed(); void flashConversationItemWidget(const LLUUID& session_id, bool is_flashes); - bool isConversationItemWidgetVisible(const LLUUID& session_id); + bool isScrolledOutOfSight(LLConversationViewSession* conversation_item_widget); boost::signals2::connection mMicroChangedSignal; private: |