summaryrefslogtreecommitdiff
path: root/indra/newview/llnearbychathandler.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llnearbychathandler.cpp')
-rw-r--r--indra/newview/llnearbychathandler.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/indra/newview/llnearbychathandler.cpp b/indra/newview/llnearbychathandler.cpp
index 3c390c0281..08ae93c3a6 100644
--- a/indra/newview/llnearbychathandler.cpp
+++ b/indra/newview/llnearbychathandler.cpp
@@ -34,6 +34,7 @@
#include "llnearbychathandler.h"
+#include "llbottomtray.h"
#include "llchatitemscontainerctrl.h"
#include "llnearbychat.h"
#include "llrecentpeople.h"
@@ -175,10 +176,11 @@ void LLNearbyChatScreenChannel::addNotification(LLSD& notification)
if(m_active_toasts.size())
{
LLUUID fromID = notification["from_id"].asUUID(); // agent id or object id
+ std::string from = notification["from"].asString();
LLToast* toast = m_active_toasts[0];
LLNearbyChatToastPanel* panel = dynamic_cast<LLNearbyChatToastPanel*>(toast->getPanel());
- if(panel && panel->messageID() == fromID && panel->canAddText())
+ if(panel && panel->messageID() == fromID && panel->getFromName() == from && panel->canAddText())
{
panel->addMessage(notification);
toast->reshapeToPanel();
@@ -319,9 +321,9 @@ LLNearbyChatHandler::~LLNearbyChatHandler()
void LLNearbyChatHandler::initChannel()
{
LLNearbyChat* nearby_chat = LLFloaterReg::getTypedInstance<LLNearbyChat>("nearby_chat", LLSD());
+ LLView* chat_box = LLBottomTray::getInstance()->getChildView("chat_box");
S32 channel_right_bound = nearby_chat->getRect().mRight;
- S32 channel_width = nearby_chat->getRect().mRight;
- mChannel->init(channel_right_bound - channel_width, channel_right_bound);
+ mChannel->init(chat_box->getRect().mLeft, channel_right_bound);
}