From e5b2be5245b6dd793488a5e36138a8c5b6f29706 Mon Sep 17 00:00:00 2001 From: Van Leemput Dayron Date: Tue, 9 Dec 2025 16:26:23 +0100 Subject: [PATCH] Retry --- lib/components/home/trip_card.dart | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/lib/components/home/trip_card.dart b/lib/components/home/trip_card.dart index 413d563..dce3789 100644 --- a/lib/components/home/trip_card.dart +++ b/lib/components/home/trip_card.dart @@ -41,12 +41,9 @@ class _TripCardState extends State { }); try { - // D'abord vérifier si une image existe déjà dans le Storage String? imageUrl = await _placeImageService.getExistingImageUrl( widget.trip.location, ); - - // Si aucune image n'existe, en télécharger une nouvelle imageUrl ??= await _placeImageService.getPlaceImageUrl( widget.trip.location, ); @@ -57,7 +54,6 @@ class _TripCardState extends State { _isLoadingImage = false; }); - // Mettre à jour le voyage dans la base de données avec l'imageUrl _updateTripWithImage(imageUrl); } else { setState(() { @@ -76,18 +72,13 @@ class _TripCardState extends State { Future _updateTripWithImage(String imageUrl) async { try { if (widget.trip.id != null) { - // Créer une copie du voyage avec la nouvelle imageUrl final updatedTrip = widget.trip.copyWith( imageUrl: imageUrl, updatedAt: DateTime.now(), ); - - // Mettre à jour dans la base de données await _tripRepository.updateTrip(widget.trip.id!, updatedTrip); } - } catch (e) { - // En cas d'erreur, on continue sans échec - l'image reste affichée localement - } + } catch (e) {} } Widget _buildImageWidget() {