Skip to content

Commit

Permalink
Add documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
Hanny Prastya Hariyadi committed Oct 12, 2023
1 parent 33aae12 commit e4c6b15
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/questionnaires/view/src/questionnaire_filler.dart
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,10 @@ class _QuestionnaireResponseFillerState

return QuestionnaireLoadingIndicator(snapshot);
}
// If the locale of `_questionnaireResponseModel` doesn't match the locale of `snapshot.data`,
// reset `_handleQuestionnaireResponseModelChangeListenerFunction` to null.
// This ensures that `_questionnaireFillerData` will be re-initialized
// using the most recent questionnaire response model that has the updated locale
if (_questionnaireResponseModel?.locale != snapshot.data?.locale) {
_handleQuestionnaireResponseModelChangeListenerFunction = null;
}
Expand Down

0 comments on commit e4c6b15

Please sign in to comment.