Skip to content

Commit

Permalink
Trigger task status update on draft submission
Browse files Browse the repository at this point in the history
  • Loading branch information
FikriMilano committed Dec 4, 2024
1 parent b13cff1 commit 36caf21
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -361,6 +361,14 @@ class QuestionnaireActivity : BaseMultiLanguageActivity() {
lifecycleScope.launch {
retrieveQuestionnaireResponse()?.let { questionnaireResponse ->
viewModel.saveDraftQuestionnaire(questionnaireResponse, questionnaireConfig)
setResult(
Activity.RESULT_OK,
Intent().apply {
putExtra(QUESTIONNAIRE_RESPONSE, questionnaireResponse as Serializable)
putExtra(QUESTIONNAIRE_CONFIG, questionnaireConfig as Parcelable)
putExtra(ON_RESULT_TYPE, ActivityOnResultType.QUESTIONNAIRE.name)
},
)
finish()
}
}
Expand Down

0 comments on commit 36caf21

Please sign in to comment.