diff --git a/packages/smooth_app/lib/pages/product/product_questions_widget.dart b/packages/smooth_app/lib/pages/product/product_questions_widget.dart index 063038d4595..8e0a5b0a7aa 100644 --- a/packages/smooth_app/lib/pages/product/product_questions_widget.dart +++ b/packages/smooth_app/lib/pages/product/product_questions_widget.dart @@ -83,10 +83,10 @@ class _ProductQuestionsWidgetState extends State }; } - void _openQuestions() { + Future _openQuestions() async { _trackEvent(AnalyticsEvent.questionClicked); - openQuestionPage( + await openQuestionPage( context, product: widget.product, questions: (_state as _ProductQuestionsWithQuestions).questions.toList( @@ -94,10 +94,19 @@ class _ProductQuestionsWidgetState extends State ), updateProductUponAnswers: _updateProductUponAnswers, ); + + if (context.mounted) { + return _reloadQuestions(silentCheck: true); + } } - Future _reloadQuestions() async { - setState(() => _state = const _ProductQuestionsLoading()); + Future _reloadQuestions({ + bool silentCheck = false, + }) async { + if (!silentCheck) { + setState(() => _state = const _ProductQuestionsLoading()); + } + final List? list = await _loadProductQuestions(); if (!mounted) {