diff options
author | Glenn Glazer <coyot@lindenlab.com> | 2016-05-25 08:12:47 -0700 |
---|---|---|
committer | Glenn Glazer <coyot@lindenlab.com> | 2016-05-25 08:12:47 -0700 |
commit | 67438c67aba96fe51dd29eee52bd332286dd2130 (patch) | |
tree | 5c10eacc151dfedcf0afcccd97da045169d5d704 /indra/newview/llnotificationtiphandler.cpp | |
parent | 9908fcf4ac43537728d1b34e30650735cfb36147 (diff) | |
parent | fb598cd380b38714abed554b8feacabfc55b2aaa (diff) |
pull from 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); |