From e39ec1e0423646edae2c3b659705af53bfe5d61c Mon Sep 17 00:00:00 2001 From: Dmitry Oleshko Date: Tue, 27 Oct 2009 12:39:50 +0200 Subject: fixed normal bug (EXT-1805) Noninteractive notification toast is redundant if local chat floater is open --HG-- branch : product-engine --- indra/newview/llnotificationtiphandler.cpp | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llnotificationtiphandler.cpp b/indra/newview/llnotificationtiphandler.cpp index 7239f49b7f..543198c1d2 100644 --- a/indra/newview/llnotificationtiphandler.cpp +++ b/indra/newview/llnotificationtiphandler.cpp @@ -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("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(mChannel); if(channel) channel->addToast(p); - - // archive message in nearby chat - LLNearbyChat* nearby_chat = LLFloaterReg::getTypedInstance("nearby_chat", LLSD()); - if(nearby_chat) - { - LLChat chat_msg(notification->getMessage()); - nearby_chat->addMessage(chat_msg); - } } else if (notify["sigtype"].asString() == "delete") { -- cgit v1.2.3