diff options
author | Steve Bennetts <steve@lindenlab.com> | 2009-11-29 18:25:03 -0800 |
---|---|---|
committer | Steve Bennetts <steve@lindenlab.com> | 2009-11-29 18:25:03 -0800 |
commit | a7549d6fe5b36b447f7e6f58387711576f9c2f63 (patch) | |
tree | 63d81cf896b107cf35b3eecabefc032e021574df /indra/newview/llnearbychathandler.cpp | |
parent | 5bff5d28ee0cd6b2d17bf1676eecb0ae262f1f48 (diff) | |
parent | f0426b924f543c62268ac5098c0c2c6a44e68084 (diff) |
Merge
Diffstat (limited to 'indra/newview/llnearbychathandler.cpp')
-rw-r--r-- | indra/newview/llnearbychathandler.cpp | 25 |
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()) { |