- fixed : teleport and friendship offers don't increment the notificaiton systwell counter and can't be dismissed
--HG-- branch : RLVameow-7.2.2
parent
574e054b09
commit
7d012cb35e
|
|
@ -35,6 +35,9 @@
|
|||
#include "llscriptfloater.h"
|
||||
#include "llsingleton.h"
|
||||
#include "llsyswellwindow.h"
|
||||
// [SL:KB] - Patch: UI-Notifications | Checked: 2013-05-09 (Catznip-3.5)
|
||||
#include "llchannelmanager.h"
|
||||
// [/SL:KB]
|
||||
|
||||
static LLDefaultChildRegistry::Register<LLChicletPanel> t1("chiclet_panel");
|
||||
static LLDefaultChildRegistry::Register<LLNotificationChiclet> t2("chiclet_notification");
|
||||
|
|
@ -231,6 +234,17 @@ bool LLNotificationChiclet::ChicletNotificationChannel::filterNotification( LLNo
|
|||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
// [SL:KB] - Patch: UI-Notifications | Checked: 2013-05-09 (Catznip-3.5)
|
||||
if ("offer" == notification->getType())
|
||||
{
|
||||
// Assume that any offer notification with "getCanBeStored() == true" is the result of RLVa routing it to the notifcation syswell
|
||||
/*const*/ LLNotificationsUI::LLScreenChannel* pChannel = LLNotificationsUI::LLChannelManager::instance().getNotificationScreenChannel();
|
||||
/*const*/ LLNotificationsUI::LLToast* pToast = (pChannel) ? pChannel->getToastByNotificationID(notification->getID()) : NULL;
|
||||
return (pToast) && (pToast->getCanBeStored());
|
||||
}
|
||||
// [/SL:KB]
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -192,9 +192,18 @@ bool LLOfferHandler::processNotification(const LLNotificationPtr& notification)
|
|||
}
|
||||
else
|
||||
{
|
||||
if (notification->canLogToIM()
|
||||
&& notification->hasFormElements()
|
||||
&& !LLHandlerUtil::isIMFloaterOpened(notification))
|
||||
// if (notification->canLogToIM()
|
||||
// && notification->hasFormElements()
|
||||
// && !LLHandlerUtil::isIMFloaterOpened(notification))
|
||||
// [SL:KB] - Patch: UI-Notifications | Checked: 2013-05-09 (Catznip-3.5)
|
||||
// The above test won't necessarily tell us whether the notification went into an IM or to the notification syswell
|
||||
// -> the one and only time we need to decrease the unread IM count is when we've clicked any of the buttons on the *toast*
|
||||
// -> since LLIMFloater::updateMessages() hides the toast when we open the IM (which resets the unread count to 0) we should
|
||||
// *only* decrease the unread IM count if there's a visible toast since the unread count will be at 0 otherwise anyway
|
||||
LLScreenChannel* pChannel = dynamic_cast<LLScreenChannel*>(mChannel.get());
|
||||
LLToast* pToast = (pChannel) ? pChannel->getToastByNotificationID(notification->getID()) : NULL;
|
||||
if ( (pToast) && (!pToast->getCanBeStored()) )
|
||||
// [/SL:KB]
|
||||
{
|
||||
LLHandlerUtil::decIMMesageCounter(notification);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -260,7 +260,17 @@ bool friendship_offer_callback(const LLSD& notification, const LLSD& response)
|
|||
modified_form->setElementEnabled("Accept", false);
|
||||
modified_form->setElementEnabled("Decline", false);
|
||||
notification_ptr->updateForm(modified_form);
|
||||
notification_ptr->repost();
|
||||
// [SL:KB] - Patch: UI-Notifications | Checked: 2013-05-09 (Catznip-3.5)
|
||||
// Assume that any offer notification with "getCanBeStored() == true" is the result of RLVa routing it to the notifcation syswell
|
||||
/*const*/ LLNotificationsUI::LLScreenChannel* pChannel = LLNotificationsUI::LLChannelManager::instance().getNotificationScreenChannel();
|
||||
/*const*/ LLNotificationsUI::LLToast* pToast = (pChannel) ? pChannel->getToastByNotificationID(notification["id"].asUUID()) : NULL;
|
||||
if ( (!pToast) || (!pToast->getCanBeStored()) )
|
||||
{
|
||||
// [/SL:KB]
|
||||
notification_ptr->repost();
|
||||
// [SL:KB] - Patch: UI-Notifications | Checked: 2013-05-09 (Catznip-3.5)
|
||||
}
|
||||
// [/SL:KB]
|
||||
}
|
||||
|
||||
return false;
|
||||
|
|
@ -2150,7 +2160,18 @@ bool lure_callback(const LLSD& notification, const LLSD& response)
|
|||
modified_form->setElementEnabled("Teleport", false);
|
||||
modified_form->setElementEnabled("Cancel", false);
|
||||
notification_ptr->updateForm(modified_form);
|
||||
notification_ptr->repost();
|
||||
|
||||
// [SL:KB] - Patch: UI-Notifications | Checked: 2013-05-09 (Catznip-3.5)
|
||||
// Assume that any offer notification with "getCanBeStored() == true" is the result of RLVa routing it to the notifcation syswell
|
||||
/*const*/ LLNotificationsUI::LLScreenChannel* pChannel = LLNotificationsUI::LLChannelManager::instance().getNotificationScreenChannel();
|
||||
/*const*/ LLNotificationsUI::LLToast* pToast = (pChannel) ? pChannel->getToastByNotificationID(notification["id"].asUUID()) : NULL;
|
||||
if ( (!pToast) || (!pToast->getCanBeStored()) )
|
||||
{
|
||||
// [/SL:KB]
|
||||
notification_ptr->repost();
|
||||
// [SL:KB] - Patch: UI-Notifications | Checked: 2013-05-09 (Catznip-3.5)
|
||||
}
|
||||
// [/SL:KB]
|
||||
}
|
||||
|
||||
return false;
|
||||
|
|
|
|||
Loading…
Reference in New Issue