From 4e00a308681bbb5b1f834574be2089fcb15641fc Mon Sep 17 00:00:00 2001 From: Andrew Gunnerson Date: Mon, 27 Jul 2026 10:38:54 -0400 Subject: [PATCH] DeviceState: Fix updateIdleState() idempotency when already idle Previously, the "already idle" state was potentially reset when updating the busy folder count, the connected device count, or when the user changed any sync schedule setting. This was a regression introduced in commit 2d70b8299551849a5ac73aee2248c3ba8899603a. Fixes: #212 Co-authored-by: Soong-Vilda Signed-off-by: Andrew Gunnerson --- .../main/java/com/chiller3/basicsync/syncthing/DeviceState.kt | 1 + 1 file changed, 1 insertion(+) diff --git a/app/src/main/java/com/chiller3/basicsync/syncthing/DeviceState.kt b/app/src/main/java/com/chiller3/basicsync/syncthing/DeviceState.kt index db77622..315513a 100644 --- a/app/src/main/java/com/chiller3/basicsync/syncthing/DeviceState.kt +++ b/app/src/main/java/com/chiller3/basicsync/syncthing/DeviceState.kt @@ -519,6 +519,7 @@ class DeviceStateTracker(private val context: Context) : idleStart = System.currentTimeMillis() } else { Log.d(TAG, "Already idle") + idleStart = state.idleStart } state = state.copy(idleStart = idleStart)