Properly reset idle timers on logout and login

When someone logs out, reset all timers to not have sent the
notifications after they are no longer relevant.

Signed-off-by: Tomas Slusny <slusnucky@gmail.com>
This commit is contained in:
Tomas Slusny
2018-06-02 21:21:58 +02:00
parent d61f52b8eb
commit c61f026518

View File

@@ -206,6 +206,9 @@ public class IdleNotifierPlugin extends Plugin
switch (state)
{
case LOGIN_SCREEN:
resetTimers();
break;
case LOGGING_IN:
case HOPPING:
case CONNECTION_LOST:
@@ -216,7 +219,9 @@ public class IdleNotifierPlugin extends Plugin
{
sixHourWarningTime = Instant.now().plus(SIX_HOUR_LOGOUT_WARNING_AFTER_DURATION);
ready = false;
resetTimers();
}
break;
}
}