Skip to content

Commit

Permalink
Merge pull request #337 from ooni/fix-upload-dialog-stuck
Browse files Browse the repository at this point in the history
Avoid upload dialog from becoming stuck after successful upload in background
  • Loading branch information
sdsantos authored Dec 17, 2024
2 parents ac7370b + da3e975 commit 2ac0d59
Showing 1 changed file with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,16 @@ fun UploadMeasurementsDialog(

is UploadMissingMeasurements.State.Finished -> {
if (state.failedToUpload == 0) {
Text(
stringResource(Res.string.Toast_ResultsUploaded),
style = MaterialTheme.typography.titleMedium,
modifier = Modifier.padding(bottom = 8.dp),
)
Row(modifier = Modifier.padding(top = 16.dp)) {
TextButton(onClick = { onEvent(UploadMeasurementsViewModel.Event.CloseClick) }) {
Text(stringResource(Res.string.Modal_OK))
}
}
val snackbarHostState = LocalSnackbarHostState.current
LaunchedEffect(Unit) {
snackbarHostState
Expand Down

0 comments on commit 2ac0d59

Please sign in to comment.