From c61f0265188075c1c30970bcc459f01eadf9c97b Mon Sep 17 00:00:00 2001 From: Tomas Slusny Date: Sat, 2 Jun 2018 21:21:58 +0200 Subject: [PATCH] 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 --- .../client/plugins/idlenotifier/IdleNotifierPlugin.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/idlenotifier/IdleNotifierPlugin.java b/runelite-client/src/main/java/net/runelite/client/plugins/idlenotifier/IdleNotifierPlugin.java index ed80f9447e..6e4fc12b14 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/idlenotifier/IdleNotifierPlugin.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/idlenotifier/IdleNotifierPlugin.java @@ -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; } }