diff options
author | andreykproductengine <akleshchev@productengine.com> | 2015-08-19 15:43:06 -0400 |
---|---|---|
committer | andreykproductengine <akleshchev@productengine.com> | 2015-08-19 15:43:06 -0400 |
commit | 75304b4ca81e3fdb9164ec607997a6c30616d8ca (patch) | |
tree | 4bee13989d3578a52e25eb867f94af08f2769ae3 /indra/newview/llnotificationtiphandler.cpp | |
parent | 6a5844d936c3317626cfcbe9d9cb66086d570fca (diff) |
MAINT-5378 Add notices for avatar complexity changes
Diffstat (limited to 'indra/newview/llnotificationtiphandler.cpp')
-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 --- 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); |