mirror of
https://github.com/permissionlesstech/bitchat-android.git
synced 2026-08-08 06:46:11 +00:00
Addresses review on #812. Pressing the new stop button before a partial file exists -- while resolving the release, or waiting for Tor -- left the row disabled and spinning for the lifetime of the ViewModel. Two guards conspired: checkStatus() returns early while the state is Downloading, and the downloader observer deliberately ignores the Idle that WorkManager reports for a cancelled job. Both exist to stop a running job being second-guessed from cache contents, and neither anticipated a job that is no longer running. checkStatus() takes a force flag, used only by cancellation, and clears the stale progress along with the status. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>