From 9af5e7838f0626e17b1b093f0eb52c92a55fca2c Mon Sep 17 00:00:00 2001 From: Alex Date: Thu, 12 Oct 2023 10:30:56 -0500 Subject: [PATCH] fix(mobile): description not render on first opening (#4451) --- .../modules/asset_viewer/ui/exif_bottom_sheet.dart | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/mobile/lib/modules/asset_viewer/ui/exif_bottom_sheet.dart b/mobile/lib/modules/asset_viewer/ui/exif_bottom_sheet.dart index 549ce988e4..10682510ab 100644 --- a/mobile/lib/modules/asset_viewer/ui/exif_bottom_sheet.dart +++ b/mobile/lib/modules/asset_viewer/ui/exif_bottom_sheet.dart @@ -364,7 +364,19 @@ class ExifBottomSheet extends HookConsumerWidget { children: [ buildDragHeader(), buildDate(), - if (asset.isRemote) DescriptionInput(asset: asset), + assetWithExif.when( + data: (data) => DescriptionInput(asset: data), + error: (error, stackTrace) => Icon( + Icons.image_not_supported_outlined, + color: Theme.of(context).primaryColor, + ), + loading: () => const SizedBox( + width: 75, + height: 75, + child: CircularProgressIndicator.adaptive(), + ), + ), + Text(exifInfo?.description ?? ""), const SizedBox(height: 8.0), buildLocation(), SizedBox(height: hasCoordinates(exifInfo) ? 16.0 : 0.0),