mirror of
https://github.com/samsonjs/immich.git
synced 2026-04-27 15:07:45 +00:00
fix: asset local type casting (#25214)
This commit is contained in:
parent
8ed81ac3e1
commit
3bf0d5b99f
1 changed files with 3 additions and 4 deletions
|
|
@ -64,11 +64,10 @@ class _SheetLocationDetailsState extends ConsumerState<SheetLocationDetails> {
|
||||||
final hasCoordinates = exifInfo?.hasCoordinates ?? false;
|
final hasCoordinates = exifInfo?.hasCoordinates ?? false;
|
||||||
|
|
||||||
// Guard local assets
|
// Guard local assets
|
||||||
if (asset != null && asset is LocalAsset && asset.hasRemote) {
|
if (asset is! RemoteAsset) {
|
||||||
return const SizedBox.shrink();
|
return const SizedBox.shrink();
|
||||||
}
|
}
|
||||||
|
|
||||||
final remoteAsset = asset as RemoteAsset;
|
|
||||||
final locationName = _getLocationName(exifInfo);
|
final locationName = _getLocationName(exifInfo);
|
||||||
final coordinates = "${exifInfo?.latitude?.toStringAsFixed(4)}, ${exifInfo?.longitude?.toStringAsFixed(4)}";
|
final coordinates = "${exifInfo?.latitude?.toStringAsFixed(4)}, ${exifInfo?.longitude?.toStringAsFixed(4)}";
|
||||||
|
|
||||||
|
|
@ -94,8 +93,8 @@ class _SheetLocationDetailsState extends ConsumerState<SheetLocationDetails> {
|
||||||
children: [
|
children: [
|
||||||
ExifMap(
|
ExifMap(
|
||||||
exifInfo: exifInfo!,
|
exifInfo: exifInfo!,
|
||||||
markerId: remoteAsset.id,
|
markerId: asset.id,
|
||||||
markerAssetThumbhash: remoteAsset.thumbHash,
|
markerAssetThumbhash: asset.thumbHash,
|
||||||
onMapCreated: _onMapCreated,
|
onMapCreated: _onMapCreated,
|
||||||
),
|
),
|
||||||
const SizedBox(height: 16),
|
const SizedBox(height: 16),
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue