diff --git a/lib/generated/intl/messages_es.dart b/lib/generated/intl/messages_es.dart index 4f3c7fd06977a57fdf59a207d81aa085ce51b00b..c15ca17009bde3de7cbdd6a867a8eebaa26f50c5 100644 --- a/lib/generated/intl/messages_es.dart +++ b/lib/generated/intl/messages_es.dart @@ -427,6 +427,8 @@ class MessageLookup extends MessageLookupByLibrary { "customRadius": MessageLookupByLibrary.simpleMessage("Radio personalizado"), "darkTheme": MessageLookupByLibrary.simpleMessage("Oscuro"), + "dayToday": MessageLookupByLibrary.simpleMessage("Hoy"), + "dayYesterday": MessageLookupByLibrary.simpleMessage("Ayer"), "decrypting": MessageLookupByLibrary.simpleMessage("Descifrando..."), "decryptingVideo": MessageLookupByLibrary.simpleMessage("Descifrando video..."), diff --git a/lib/ui/viewer/file/zoomable_live_image.dart b/lib/ui/viewer/file/zoomable_live_image.dart index cb2ebd0602af0570ee29d48126ec7fe19f463640..9ae072f9f9f796c018553854c3280dcf39308f67 100644 --- a/lib/ui/viewer/file/zoomable_live_image.dart +++ b/lib/ui/viewer/file/zoomable_live_image.dart @@ -125,7 +125,7 @@ class _ZoomableLiveImageState extends State return; } _isLoadingVideoPlayer = true; - io.File? videoFile = _file.fileType == FileType.livePhoto + final io.File? videoFile = _file.fileType == FileType.livePhoto ? await _getLivePhotoVideo() : await _getMotionPhotoVideo(); @@ -178,7 +178,7 @@ class _ZoomableLiveImageState extends State }); if (imageFile != null) { final motionPhoto = MotionPhotos(imageFile.path); - final index = motionPhoto.getMotionVideoIndex(); + final index = await motionPhoto.getMotionVideoIndex(); if (index != null) { if (widget.file.pubMagicMetadata?.mvi == null && (widget.file.ownerID ?? 0) == Configuration.instance.getUserID()!) { diff --git a/lib/utils/file_uploader_util.dart b/lib/utils/file_uploader_util.dart index 3f0e71644b96efe99e7d53870504ecfebbf396df..fcda90210ecc4535db957fc7a3298610e5be1bef 100644 --- a/lib/utils/file_uploader_util.dart +++ b/lib/utils/file_uploader_util.dart @@ -163,7 +163,7 @@ Future _getMediaUploadDataFromAssetFile(ente.File file) async { if (io.Platform.isAndroid && asset.type == AssetType.image) { try { motionPhotoStartingIndex = - MotionPhotos(sourceFile.path).getMotionVideoIndex()?.start; + (await MotionPhotos(sourceFile.path).getMotionVideoIndex())?.start; } catch (e) { _logger.severe('error while detecthing motion photo start index', e); } diff --git a/pubspec.lock b/pubspec.lock index efc2b249542ddcdcd8aac1ffd62237414fc9d59c..f1d87e341463f5ad03138ab789ff93e9e16dfc83 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -1186,7 +1186,7 @@ packages: description: path: "." ref: HEAD - resolved-ref: ceeaff6e16bd9e3c98e7da2b1109dc04a93098b9 + resolved-ref: "989ea86e513755d9a8cf945e7522100fc2877639" url: "https://github.com/ente-io/motion_photo.git" source: git version: "0.0.1"