Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

[mobile][photos] patch path to get live photo to support system trash files

Priyanshu Dangare11142bfd0995
diff --git a/mobile/apps/photos/lib/module/download/file.dart b/mobile/apps/photos/lib/module/download/file.dart
index 54d51c8b75..5d4bb7784b 100644
--- a/mobile/apps/photos/lib/module/download/file.dart
+++ b/mobile/apps/photos/lib/module/download/file.dart
@@ -79,12 +79,14 @@ Future<File?> _getLocalDiskFile(
bool isOrigin = false,
}) {
if (file.isSharedMediaToAppSandbox) {
- final localFile = File(getSharedMediaFilePath(file));
+ final localFile = File(getSharedMediaPathFromLocalID(file.localID!));
return localFile.exists().then((exist) {
return exist ? localFile : null;
});
} else if (file.fileType == FileType.livePhoto && liveVideo) {
- return Motionphoto.getLivePhotoFile(file.localID!);
+ return Motionphoto.getLivePhotoFile(
+ (file.asTrashFile?.systemTrashID?.toString() ?? file.localID)!,
+ );
} else {
return file.getAsset.then((asset) async {
if (asset == null || !(await asset.exists)) {