summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
Diffstat (limited to 'indra')
-rwxr-xr-xindra/newview/llconversationview.cpp12
-rw-r--r--indra/newview/llfloaterimcontainer.cpp16
-rw-r--r--indra/newview/llfloaterimcontainer.h1
3 files changed, 29 insertions, 0 deletions
diff --git a/indra/newview/llconversationview.cpp b/indra/newview/llconversationview.cpp
index 441de2e1a5..850668388f 100755
--- a/indra/newview/llconversationview.cpp
+++ b/indra/newview/llconversationview.cpp
@@ -39,6 +39,7 @@
#include "llfloaterreg.h"
#include "llgroupiconctrl.h"
#include "lluictrlfactory.h"
+#include "lltoolbarview.h"
//
// Implementation of conversations list session widgets
@@ -114,6 +115,17 @@ 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 view (because flashing will not be visible)
+ if (!mContainer->isConversationItemWidgetVisible(vmi->getUUID()))
+ {
+ gToolBarView->flashCommand(LLCommandId("chat"), true);
+ }
+ }
}
}
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<LLConversationViewSession*>(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.
diff --git a/indra/newview/llfloaterimcontainer.h b/indra/newview/llfloaterimcontainer.h
index 569fa9faab..156f11f14e 100644
--- a/indra/newview/llfloaterimcontainer.h
+++ b/indra/newview/llfloaterimcontainer.h
@@ -185,6 +185,7 @@ public:
void updateSpeakBtnState();
static bool isConversationLoggingAllowed();
void flashConversationItemWidget(const LLUUID& session_id, bool is_flashes);
+ bool isConversationItemWidgetVisible(const LLUUID& session_id);
boost::signals2::connection mMicroChangedSignal;
private: