diff options
author | Monroe Linden <monroe@lindenlab.com> | 2010-09-29 16:51:21 -0700 |
---|---|---|
committer | Monroe Linden <monroe@lindenlab.com> | 2010-09-29 16:51:21 -0700 |
commit | 27f6b2ea7d9339f9ecfd3f7bbbde356cfe007848 (patch) | |
tree | 49d668cb571988d80e6094a2bdf8bc907b485873 /indra/llui | |
parent | af4b2247005268dbf92f8bc6994c7048b1035454 (diff) |
Change non-visible notifications to return empty response instead of default.
This is part of EXP-111.
Reviewed by Richard.
Diffstat (limited to 'indra/llui')
-rw-r--r-- | indra/llui/llnotifications.cpp | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/indra/llui/llnotifications.cpp b/indra/llui/llnotifications.cpp index 6e1f574935..98718e4de7 100644 --- a/indra/llui/llnotifications.cpp +++ b/indra/llui/llnotifications.cpp @@ -182,6 +182,20 @@ bool defaultResponse(const LLSD& payload) return false; } +bool emptyResponse(const LLSD& payload) +{ + if (payload["sigtype"].asString() == "add") + { + LLNotificationPtr pNotif = LLNotifications::instance().find(payload["id"].asUUID()); + if (pNotif) + { + // supply empty response + pNotif->respond(pNotif->getResponseTemplate(LLNotification::WITHOUT_DEFAULT_BUTTON)); + } + } + return false; +} + namespace LLNotificationFilters { // a sample filter @@ -1238,7 +1252,7 @@ void LLNotifications::createDefaultChannels() LLNotifications::instance().getChannel("Ignore")-> connectFailedFilter(&handleIgnoredNotification); LLNotifications::instance().getChannel("VisibilityRules")-> - connectFailedFilter(&handleIgnoredNotification); + connectFailedFilter(&emptyResponse); } bool LLNotifications::addTemplate(const std::string &name, |