summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMnikolenko ProductEngine <mnikolenko@productengine.com>2013-02-21 15:11:32 +0200
committerMnikolenko ProductEngine <mnikolenko@productengine.com>2013-02-21 15:11:32 +0200
commitf79f9f111b0db67cacfe9bbe453737f3979b3ba9 (patch)
treef8a66ad95d4515c8c8cedd35b5e0437d9644cbe4
parent1b464fae878550c22c98d9773e33be289447b503 (diff)
CHUI-774 FIXED Play a sound even if the conversation floater is open and conversation with user is the active.
-rw-r--r--indra/newview/llnotificationofferhandler.cpp24
1 files changed, 13 insertions, 11 deletions
diff --git a/indra/newview/llnotificationofferhandler.cpp b/indra/newview/llnotificationofferhandler.cpp
index a2bd96f35a..2657b84ef3 100644
--- a/indra/newview/llnotificationofferhandler.cpp
+++ b/indra/newview/llnotificationofferhandler.cpp
@@ -96,8 +96,21 @@ bool LLOfferHandler::processNotification(const LLNotificationPtr& notification)
LLUUID from_id = notification->getPayload()["from_id"];
+ //Will not play a notification sound for inventory and teleport offer based upon chat preference
+ bool playSound = (!notification->isDND()
+ && ((notification->getName() == "UserGiveItem"
+ && gSavedSettings.getBOOL("PlaySoundInventoryOffer"))
+ || (notification->getName() == "TeleportOffered"
+ && gSavedSettings.getBOOL("PlaySoundTeleportOffer"))));
+
+ if(playSound)
+ {
+ notification->playSound();
+ }
+
LLHandlerUtil::spawnIMSession(name, from_id);
LLHandlerUtil::addNotifPanelToIM(notification);
+
}
if (!notification->canShowToast())
@@ -119,17 +132,6 @@ bool LLOfferHandler::processNotification(const LLNotificationPtr& notification)
if(channel)
channel->addToast(p);
- //Will not play a notification sound for inventory and teleport offer based upon chat preference
- bool playSound = (!notification->isDND()
- && ((notification->getName() == "UserGiveItem"
- && gSavedSettings.getBOOL("PlaySoundInventoryOffer"))
- || (notification->getName() == "TeleportOffered"
- && gSavedSettings.getBOOL("PlaySoundTeleportOffer"))));
-
- if(playSound)
- {
- notification->playSound();
- }
}
if (notification->canLogToIM())