Skip to content

Reschedule media uploads when the Wi-Fi-only preference changes - #3946

Open
shobhitagarwal1612 wants to merge 1 commit into
masterfrom
issue-3945
Open

shobhitagarwal1612 wants to merge 1 commit into
masterfrom
issue-3945

Conversation

@shobhitagarwal1612

@shobhitagarwal1612 shobhitagarwal1612 commented Sep 16, 2026

Copy link
Copy Markdown
Member

Fixes #3945

WorkManager constraints are immutable once a request is enqueued, so unchecking "Upload photos over Wi-Fi only" never applied to media uploads which had already been scheduled. Appending a new request left it blocked behind work still awaiting an unmetered connection, so pending photos were only uploaded once the device rejoined Wi-Fi.

Replace pending media upload work when the preference changes so that the newly selected network type takes effect, and cancel it when local data is cleared, so that work left behind by a signed out user can't block uploads enqueued by the next one.

Also adds missing test coverage for the worker.

Screen_recording_20260916_222109.webm

@jo-spek @gino-m PTAL?

WorkManager constraints are immutable once a request is enqueued, so
unchecking "Upload photos over Wi-Fi only" never applied to media
uploads which had already been scheduled. Appending a new request left
it blocked behind work still awaiting an unmetered connection, so
pending photos were only uploaded once the device rejoined Wi-Fi.

Replace pending media upload work when the preference changes so that
the newly selected network type takes effect, and cancel it when local
data is cleared, so that work left behind by a signed out user can't
block uploads enqueued by the next one.

Fixes #3945
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Media upload pending despite switching off "WiFi-upload only"

1 participant