Ensure the form data are not lost when opening the log viewer. Closes #5579

This commit is contained in:
Benoit Marty 2025-11-06 18:16:39 +01:00
parent 516fc722cb
commit f7cca0fc0c

View file

@ -32,7 +32,7 @@ class BugReportPresenter(
private val bugReporter: BugReporter,
private val crashDataStore: CrashDataStore,
private val screenshotHolder: ScreenshotHolder,
@AppCoroutineScope
@param:AppCoroutineScope
private val appCoroutineScope: CoroutineScope,
) : Presenter<BugReportState> {
private class BugReporterUploadListener(
@ -77,7 +77,7 @@ class BugReportPresenter(
val sendingAction: MutableState<AsyncAction<Unit>> = remember {
mutableStateOf(AsyncAction.Uninitialized)
}
val formState: MutableState<BugReportFormState> = remember {
val formState: MutableState<BugReportFormState> = rememberSaveable {
mutableStateOf(BugReportFormState.Default)
}
val uploadListener = BugReporterUploadListener(sendingProgress, sendingAction)