From ba6ec047a97661d0fe961ee54ee45a3c216640a4 Mon Sep 17 00:00:00 2001 From: Kelrap <99418823+Kelrap@users.noreply.github.com> Date: Mon, 14 Jul 2025 12:28:53 -0400 Subject: [PATCH] Hide 'Try again' button on activity timeout (#3453) --- .../activity_suggestions_area.dart | 20 ++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/lib/pangea/activity_suggestions/activity_suggestions_area.dart b/lib/pangea/activity_suggestions/activity_suggestions_area.dart index 051125513..3bfad5bdc 100644 --- a/lib/pangea/activity_suggestions/activity_suggestions_area.dart +++ b/lib/pangea/activity_suggestions/activity_suggestions_area.dart @@ -216,17 +216,19 @@ class ActivitySuggestionsAreaState extends State { ? L10n.of(context).activitySuggestionTimeoutMessage : L10n.of(context).errorFetchingActivitiesMessage, ), - ElevatedButton( - onPressed: _setActivityItems, - style: ElevatedButton.styleFrom( - backgroundColor: theme.colorScheme.primaryContainer, - foregroundColor: theme.colorScheme.onPrimaryContainer, - padding: const EdgeInsets.symmetric( - horizontal: 12.0, + if (!_timeout) + ElevatedButton( + onPressed: _setActivityItems, + style: ElevatedButton.styleFrom( + backgroundColor: theme.colorScheme.primaryContainer, + foregroundColor: + theme.colorScheme.onPrimaryContainer, + padding: const EdgeInsets.symmetric( + horizontal: 12.0, + ), ), + child: Text(L10n.of(context).tryAgain), ), - child: Text(L10n.of(context).tryAgain), - ), ], ), )