Skip to content

Commit

Permalink
Fix bug 11 - shared tiktok URL is not reset upon submit/cancel.
Browse files Browse the repository at this point in the history
  • Loading branch information
pcraciunoiu committed Jul 3, 2024
1 parent 5c6f7a0 commit 0197ca1
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,8 @@ class ReportFormScreenViewModel @Inject constructor(

tikTokReporterRepository.tikTokUrl.onSubscription { emit(null) }.map {
val fields = study.form?.fields.orEmpty().toUiComponents(it)
initialFormFields = fields
// Initial data must be all blank values, so cancel/submit resets properly
initialFormFields = study.form?.fields.orEmpty().toUiComponents()

Pair(study, fields)
}
Expand Down

0 comments on commit 0197ca1

Please sign in to comment.