diff options
author | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2024-04-09 00:05:05 +0300 |
---|---|---|
committer | Andrey Kleshchev <117672381+akleshchev@users.noreply.github.com> | 2024-04-09 15:29:46 +0300 |
commit | 7947ce355964752d8385f11e2abdc4ca405c7e65 (patch) | |
tree | 8d29a4788491a62922b553f46d0b0383b809b096 /indra/newview/llappviewer.cpp | |
parent | 9567393f803dfb0c786b8e917e41c8f4b8b22af7 (diff) |
triage#162 "Away" status is removed even by a random hover
instead of having a 10 second delay to 'confirm' activity
Diffstat (limited to 'indra/newview/llappviewer.cpp')
-rw-r--r-- | indra/newview/llappviewer.cpp | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index a1fecdb981..5002846262 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -454,11 +454,20 @@ void idle_afk_check() { // check idle timers F32 current_idle = gAwayTriggerTimer.getElapsedTimeF32(); - F32 afk_timeout = gSavedSettings.getS32("AFKTimeout"); - if (afk_timeout && (current_idle > afk_timeout) && ! gAgent.getAFK()) + LLCachedControl<S32> afk_timeout(gSavedSettings, "AFKTimeout", 300); + if (afk_timeout() && (current_idle > afk_timeout())) { - LL_INFOS("IdleAway") << "Idle more than " << afk_timeout << " seconds: automatically changing to Away status" << LL_ENDL; - gAgent.setAFK(); + if (!gAgent.getAFK()) + { + LL_INFOS("IdleAway") << "Idle more than " << afk_timeout << " seconds: automatically changing to Away status" << LL_ENDL; + gAgent.setAFK(); + } + else + { + // Refresh timer so that random one click or hover won't clear the status. + // But expanding the window still should lift afk status + gAwayTimer.reset(); + } } } |