summaryrefslogtreecommitdiff
path: root/indra/newview/llnotificationtiphandler.cpp
diff options
context:
space:
mode:
authorOz Linden <oz@lindenlab.com>2016-03-07 12:41:11 -0500
committerOz Linden <oz@lindenlab.com>2016-03-07 12:41:11 -0500
commit5822fb00b605d4f4ddd01e887b40d04b67e162a9 (patch)
tree0aa733a2357c99383f18ed34d2fb2ad4ad0caa24 /indra/newview/llnotificationtiphandler.cpp
parentc7ebeb842010c4a814978f63c464e1546bd6a9be (diff)
parent346ee6595d395a92a1445441467971510e6f4b6d (diff)
merge DRTVWR-398 build cleanup fixes
Diffstat (limited to 'indra/newview/llnotificationtiphandler.cpp')
-rw-r--r--indra/newview/llnotificationtiphandler.cpp16
1 files changed, 14 insertions, 2 deletions
diff --git a/indra/newview/llnotificationtiphandler.cpp b/indra/newview/llnotificationtiphandler.cpp
index 4ca961c1f9..596327e8f1 100644
--- a/indra/newview/llnotificationtiphandler.cpp
+++ b/indra/newview/llnotificationtiphandler.cpp
@@ -113,11 +113,23 @@ bool LLTipHandler::processNotification(const LLNotificationPtr& notification)
LLToast::Params p;
p.notif_id = notification->getID();
p.notification = notification;
- p.lifetime_secs = gSavedSettings.getS32("NotificationTipToastLifeTime");
p.panel = notify_box;
p.is_tip = true;
p.can_be_stored = false;
-
+
+ LLDate cur_time = LLDate::now();
+ LLDate exp_time = notification->getExpiration();
+ if (exp_time > cur_time)
+ {
+ // we have non-default expiration time - keep visible until expires
+ p.lifetime_secs = exp_time.secondsSinceEpoch() - cur_time.secondsSinceEpoch();
+ }
+ else
+ {
+ // use default time
+ p.lifetime_secs = gSavedSettings.getS32("NotificationTipToastLifeTime");
+ }
+
LLScreenChannel* channel = dynamic_cast<LLScreenChannel*>(mChannel.get());
if(channel)
channel->addToast(p);