fixed normal bug (EXT-1805) Noninteractive notification toast is redundant if local chat floater is open

--HG--
branch : product-engine
meow-7.2.2
Dmitry Oleshko 2009-10-27 12:39:50 +02:00
parent d0d208fbf6
commit e39ec1e042
1 changed files with 14 additions and 8 deletions

View File

@ -86,6 +86,20 @@ bool LLTipHandler::processNotification(const LLSD& notify)
if(notify["sigtype"].asString() == "add" || notify["sigtype"].asString() == "change")
{
// archive message in nearby chat
LLNearbyChat* nearby_chat = LLFloaterReg::getTypedInstance<LLNearbyChat>("nearby_chat", LLSD());
if(nearby_chat)
{
LLChat chat_msg(notification->getMessage());
nearby_chat->addMessage(chat_msg);
// don't show toast if Nearby Chat is opened
if (nearby_chat->getVisible())
{
return true;
}
}
LLToastNotifyPanel* notify_box = new LLToastNotifyPanel(notification);
LLToast::Params p;
@ -99,14 +113,6 @@ bool LLTipHandler::processNotification(const LLSD& notify)
LLScreenChannel* channel = dynamic_cast<LLScreenChannel*>(mChannel);
if(channel)
channel->addToast(p);
// archive message in nearby chat
LLNearbyChat* nearby_chat = LLFloaterReg::getTypedInstance<LLNearbyChat>("nearby_chat", LLSD());
if(nearby_chat)
{
LLChat chat_msg(notification->getMessage());
nearby_chat->addMessage(chat_msg);
}
}
else if (notify["sigtype"].asString() == "delete")
{