diff options
author | AndreyL ProductEngine <alihatskiy@productengine.com> | 2016-05-20 02:06:08 +0300 |
---|---|---|
committer | AndreyL ProductEngine <alihatskiy@productengine.com> | 2016-05-20 02:06:08 +0300 |
commit | c50f96b49215b4279192ffc3eb336a3465a00756 (patch) | |
tree | da923846a177ea97882dd0ba07b9235a5f0e7b8b /indra/newview/llnotificationtiphandler.cpp | |
parent | d3de134da047460c68ffd7cc732e592049a1e83d (diff) | |
parent | b25a22a2c113a1e95f2cd5d45bb5b80a756c4a80 (diff) |
Merged in lindenlab/viewer-lynx
Diffstat (limited to 'indra/newview/llnotificationtiphandler.cpp')
-rw-r--r--[-rwxr-xr-x] | indra/newview/llnotificationtiphandler.cpp | 16 |
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); |