summaryrefslogtreecommitdiff
path: root/indra/newview/llnotificationtiphandler.cpp
diff options
context:
space:
mode:
authorAndreyL ProductEngine <alihatskiy@productengine.com>2016-05-19 23:02:37 +0300
committerAndreyL ProductEngine <alihatskiy@productengine.com>2016-05-19 23:02:37 +0300
commitb25a22a2c113a1e95f2cd5d45bb5b80a756c4a80 (patch)
tree968ce9657026035901b3604b012f7dff96a2d122 /indra/newview/llnotificationtiphandler.cpp
parent8243301b3ff6c90db6d1fb53baf5050666d75d9a (diff)
parentc2ef3b4c7186dbbd95b16520f281b7d58364fb52 (diff)
Merged in lindenlab/viewer-release
Diffstat (limited to 'indra/newview/llnotificationtiphandler.cpp')
-rw-r--r--[-rwxr-xr-x]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 100755..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);