Skip to content
Snippets Groups Projects
Commit 561cee12 authored by Mnikolenko Productengine's avatar Mnikolenko Productengine
Browse files

MAINT-2585 Make permission request notifications permanent until action taken

parent 7021f95b
Branches
Tags
No related merge requests found
......@@ -426,6 +426,7 @@ LLNotificationTemplate::LLNotificationTemplate(const LLNotificationTemplate::Par
mLogToChat(p.log_to_chat),
mLogToIM(p.log_to_im),
mShowToast(p.show_toast),
mFadeToast(p.fade_toast),
mSoundName("")
{
if (p.sound.isProvided()
......@@ -942,6 +943,11 @@ bool LLNotification::canShowToast() const
return mTemplatep->mShowToast;
}
bool LLNotification::canFadeToast() const
{
return mTemplatep->mFadeToast;
}
bool LLNotification::hasFormElements() const
{
return mTemplatep->mForm->getNumElements() != 0;
......
......@@ -558,6 +558,7 @@ friend class LLNotifications;
bool canLogToChat() const;
bool canLogToIM() const;
bool canShowToast() const;
bool canFadeToast() const;
bool hasFormElements() const;
void playSound();
......
......@@ -177,6 +177,7 @@ struct LLNotificationTemplate
Optional<bool> persist,
log_to_im,
show_toast,
fade_toast,
log_to_chat,
force_urls_external;
Optional<std::string> functor,
......@@ -199,6 +200,7 @@ struct LLNotificationTemplate
Params()
: name("name"),
persist("persist", false),
fade_toast("fade_toast", true),
log_to_im("log_to_im", false),
show_toast("show_toast", true),
log_to_chat("log_to_chat", true),
......@@ -316,6 +318,7 @@ struct LLNotificationTemplate
bool mLogToChat;
bool mLogToIM;
bool mShowToast;
bool mFadeToast;
};
#endif //LL_LLNOTIFICATION_TEMPLATE_H
......
......@@ -131,6 +131,7 @@ bool LLOfferHandler::processNotification(const LLNotificationPtr& notification)
// we not save offer notifications to the syswell floater that should be added to the IM floater
p.can_be_stored = !add_notif_to_im;
p.force_show = notification->getOfferFromAgent();
p.can_fade = notification->canFadeToast();
LLScreenChannel* channel = dynamic_cast<LLScreenChannel*>(mChannel.get());
if(channel)
......
......@@ -77,6 +77,7 @@ void LLScriptHandler::addToastWithNotification(const LLNotificationPtr& notifica
p.notification = notification;
p.panel = notify_box;
p.on_delete_toast = boost::bind(&LLScriptHandler::onDeleteToast, this, _1);
p.can_fade = notification->canFadeToast();
if(gAgent.isDoNotDisturb())
{
p.force_show = notification->getName() == "SystemMessage"
......
......@@ -7527,6 +7527,7 @@ Your object named &lt;nolink&gt;[OBJECTFROMNAME]&lt;/nolink&gt; has given you th
name="TeleportOffered"
log_to_im="true"
log_to_chat="false"
fade_toast="false"
type="offer"
sound="UISndNewIncomingIMSession">
[NAME_SLURL] has offered to teleport you to their location:
......@@ -7602,6 +7603,7 @@ However, this region contains content accessible to adults only.
icon="notify.tga"
name="TeleportRequest"
log_to_im="true"
fade_toast="false"
type="offer">
[NAME_SLURL] is requesting to be teleported to your location.
[MESSAGE]
......@@ -7958,6 +7960,7 @@ Other Key Experiences may be available.
icon="notify.tga"
name="ScriptQuestionExperience"
persist="false"
fade_toast="false"
type="notify">
&apos;&lt;nolink&gt;[OBJECTNAME]&lt;/nolink&gt;&apos;, an object owned by &apos;[NAME]&apos;, requests your participation in the [GRID_WIDE] experience:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment