summaryrefslogtreecommitdiff
path: root/indra/newview/lltoast.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/lltoast.cpp')
-rw-r--r--indra/newview/lltoast.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/indra/newview/lltoast.cpp b/indra/newview/lltoast.cpp
index 84931e4d2d..19f56a5cf0 100644
--- a/indra/newview/lltoast.cpp
+++ b/indra/newview/lltoast.cpp
@@ -43,7 +43,7 @@ using namespace LLNotificationsUI;
//--------------------------------------------------------------------------
LLToast::LLToast(LLToast::Params p) : LLModalDialog(LLSD(), p.is_modal),
mPanel(p.panel),
- mTimerValue(p.timer_period),
+ mToastLifetime(p.lifetime_secs),
mNotificationID(p.notif_id),
mSessionID(p.session_id),
mCanFade(p.can_fade),
@@ -103,22 +103,22 @@ void LLToast::setAndStartTimer(F32 period)
{
if(mCanFade)
{
- mTimerValue = period;
+ mToastLifetime = period;
mTimer.start();
}
}
//--------------------------------------------------------------------------
-bool LLToast::timerHasExpired()
+bool LLToast::lifetimeHasExpired()
{
if (mTimer.getStarted())
{
F32 elapsed_time = mTimer.getElapsedTimeF32();
- if (elapsed_time > gSavedSettings.getS32("ToastOpaqueTime"))
+ if ((mToastLifetime - elapsed_time) <= gSavedSettings.getS32("ToastOpaqueTime"))
{
setBackgroundOpaque(FALSE);
}
- if (elapsed_time > mTimerValue)
+ if (elapsed_time > mToastLifetime)
{
return true;
}
@@ -183,7 +183,7 @@ void LLToast::insertPanel(LLPanel* panel)
//--------------------------------------------------------------------------
void LLToast::draw()
{
- if(timerHasExpired())
+ if(lifetimeHasExpired())
{
tick();
}