CHUI-774 FIXED Play a sound even if the conversation floater is open and conversation with user is the active.

meow-7.2.2
Mnikolenko ProductEngine 2013-02-21 15:11:32 +02:00
parent 1b464fae87
commit f79f9f111b
1 changed files with 13 additions and 11 deletions

View File

@ -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())