summaryrefslogtreecommitdiff
path: root/indra/newview/llnotificationtiphandler.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llnotificationtiphandler.cpp')
-rw-r--r--indra/newview/llnotificationtiphandler.cpp81
1 files changed, 38 insertions, 43 deletions
diff --git a/indra/newview/llnotificationtiphandler.cpp b/indra/newview/llnotificationtiphandler.cpp
index f07109335d..3588721849 100644
--- a/indra/newview/llnotificationtiphandler.cpp
+++ b/indra/newview/llnotificationtiphandler.cpp
@@ -82,61 +82,56 @@ bool LLTipHandler::processNotification(const LLNotificationPtr& notification)
// archive message in nearby chat
if (notification->canLogToChat())
- {
- LLHandlerUtil::logToNearbyChat(notification, CHAT_SOURCE_SYSTEM);
-
- // don't show toast if Nearby Chat is opened
- LLNearbyChat* nearby_chat = LLNearbyChat::getInstance();
- LLNearbyChatBar* nearby_chat_bar = LLNearbyChatBar::getInstance();
- if (!nearby_chat_bar->isMinimized() && nearby_chat_bar->getVisible() && nearby_chat->getVisible())
- {
- return false;
- }
- }
+ {
+ LLHandlerUtil::logToNearbyChat(notification, CHAT_SOURCE_SYSTEM);
- std::string session_name = notification->getPayload()["SESSION_NAME"];
- const std::string name = notification->getSubstitutions()["NAME"];
- if (session_name.empty())
+ // don't show toast if Nearby Chat is opened
+ LLNearbyChat* nearby_chat = LLNearbyChat::getInstance();
+ LLNearbyChatBar* nearby_chat_bar = LLNearbyChatBar::getInstance();
+ if (!nearby_chat_bar->isMinimized() && nearby_chat_bar->getVisible() && nearby_chat->getVisible())
{
- session_name = name;
+ return false;
}
- LLUUID from_id = notification->getPayload()["from_id"];
+ }
+
+ std::string session_name = notification->getPayload()["SESSION_NAME"];
+ const std::string name = notification->getSubstitutions()["NAME"];
+ if (session_name.empty())
+ {
+ session_name = name;
+ }
+ LLUUID from_id = notification->getPayload()["from_id"];
if (notification->canLogToIM())
- {
- LLHandlerUtil::logToIM(IM_NOTHING_SPECIAL, session_name, name,
- notification->getMessage(), from_id, from_id);
- }
+ {
+ LLHandlerUtil::logToIM(IM_NOTHING_SPECIAL, session_name, name,
+ notification->getMessage(), from_id, from_id);
+ }
if (notification->canLogToIM() && notification->hasFormElements())
- {
- LLHandlerUtil::spawnIMSession(name, from_id);
- }
+ {
+ LLHandlerUtil::spawnIMSession(name, from_id);
+ }
if (notification->canLogToIM() && LLHandlerUtil::isIMFloaterOpened(notification))
- {
- return false;
- }
+ {
+ return false;
+ }
- LLToastPanel* notify_box = LLToastPanel::buidPanelFromNotification(notification);
+ LLToastPanel* notify_box = LLToastPanel::buidPanelFromNotification(notification);
- LLToast::Params p;
- p.notif_id = notification->getID();
- p.notification = notification;
- p.lifetime_secs = gSavedSettings.getS32("NotificationTipToastLifeTime");
- p.panel = notify_box;
- p.is_tip = true;
- p.can_be_stored = false;
+ LLToast::Params p;
+ p.notif_id = notification->getID();
+ p.notification = notification;
+ p.lifetime_secs = gSavedSettings.getS32("NotificationTipToastLifeTime");
+ p.panel = notify_box;
+ p.is_tip = true;
+ p.can_be_stored = false;
- removeExclusiveNotifications(notification);
+ removeExclusiveNotifications(notification);
- LLScreenChannel* channel = dynamic_cast<LLScreenChannel*>(mChannel.get());
- if(channel)
- channel->addToast(p);
- }
- else if (notify["sigtype"].asString() == "delete")
- {
- mChannel->killToastByNotificationID(notification->getID());
- }
+ LLScreenChannel* channel = dynamic_cast<LLScreenChannel*>(mChannel.get());
+ if(channel)
+ channel->addToast(p);
return false;
}