Ver Fonte

Fix livePhoto playback experience when photo was downloaded from remote

Neeraj Gupta há 3 anos atrás
pai
commit
fc67160222
1 ficheiros alterados com 4 adições e 1 exclusões
  1. 4 1
      lib/ui/viewer/file/zoomable_live_image.dart

+ 4 - 1
lib/ui/viewer/file/zoomable_live_image.dart

@@ -130,8 +130,11 @@ class _ZoomableLiveImageState extends State<ZoomableLiveImage>
       return null;
       return null;
     });
     });
 
 
+    // FixMe: Here, we are fetching video directly when getFile failed
+    // getFile with liveVideo as true can fail for file with localID when
+    // the live photo was downloaded from remote.
     if ((videoFile == null || !videoFile.existsSync()) &&
     if ((videoFile == null || !videoFile.existsSync()) &&
-        _file.isRemoteFile()) {
+        _file.uploadedFileID != null) {
       videoFile = await getFileFromServer(widget.file, liveVideo: true)
       videoFile = await getFileFromServer(widget.file, liveVideo: true)
           .timeout(const Duration(seconds: 15))
           .timeout(const Duration(seconds: 15))
           .onError((e, s) {
           .onError((e, s) {