summaryrefslogtreecommitdiff
path: root/indra/newview/llnearbychathandler.cpp
diff options
context:
space:
mode:
authorYuri Chebotarev <ychebotarev@productengine.com>2009-11-25 13:48:13 +0200
committerYuri Chebotarev <ychebotarev@productengine.com>2009-11-25 13:48:13 +0200
commitc2c83f3535c5a0bc099528580375afc99ad3b020 (patch)
treef54a6fb13ca135ff54a897836281df517aeab2f3 /indra/newview/llnearbychathandler.cpp
parent7f7191c1735a2a823943119eec5c1ca160a7bf8d (diff)
EXT-2555 Change look and feel of nearby chat toasts
--HG-- branch : product-engine
Diffstat (limited to 'indra/newview/llnearbychathandler.cpp')
-rw-r--r--indra/newview/llnearbychathandler.cpp25
1 files changed, 23 insertions, 2 deletions
diff --git a/indra/newview/llnearbychathandler.cpp b/indra/newview/llnearbychathandler.cpp
index 74a75d0369..b0b6db682c 100644
--- a/indra/newview/llnearbychathandler.cpp
+++ b/indra/newview/llnearbychathandler.cpp
@@ -52,8 +52,6 @@ using namespace LLNotificationsUI;
LLToastPanelBase* createToastPanel()
{
LLNearbyChatToastPanel* item = LLNearbyChatToastPanel::createInstance();
- static S32 chat_item_width = 304;
- item->setWidth(chat_item_width);
return item;
}
@@ -169,6 +167,29 @@ void LLNearbyChatScreenChannel::addNotification(LLSD& notification)
//look in pool. if there is any message
if(mStopProcessing)
return;
+
+ /*
+ find last toast and check ID
+ */
+
+ if(m_active_toasts.size())
+ {
+ LLUUID fromID = notification["from_id"].asUUID(); // agent id or object id
+ LLToast* toast = m_active_toasts[0];
+ LLNearbyChatToastPanel* panel = dynamic_cast<LLNearbyChatToastPanel*>(toast->getPanel());
+
+ if(panel && panel->messageID() == fromID && panel->canAddText())
+ {
+ panel->addMessage(notification);
+ toast->reshapeToPanel();
+ toast->resetTimer();
+
+ arrangeToasts();
+ return;
+ }
+ }
+
+
if(m_toast_pool.empty())
{