mirror of
https://github.com/permissionlesstech/bitchat-android.git
synced 2026-11-22 08:16:23 +00:00
Codex caught this and it is correct. WorkManager returns a retried request to ENQUEUED for the duration of its backoff whether or not the device is online, and the mapping sent every ENQUEUED record to AwaitingConnectivity. With exponential backoff from 15s over three attempts, a fully connected device claimed "Waiting for network…" in both the row and the notification for roughly 45 seconds. ENQUEUED covers two different waits and the state alone cannot separate them; a non-zero runAttemptCount means the work already ran, so it is the backoff. Adds a Retrying phase for that case, extracted as queuedPhase() so the distinction is testable without a WorkInfo. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>