Sfoglia il codice sorgente

Fix livePhoto playback experience when photo was downloaded from remote

Neeraj Gupta 3 anni fa
parent
commit
fc67160222
1 ha cambiato i file con 4 aggiunte e 1 eliminazioni
  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;
     });
 
+    // 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()) &&
-        _file.isRemoteFile()) {
+        _file.uploadedFileID != null) {
       videoFile = await getFileFromServer(widget.file, liveVideo: true)
           .timeout(const Duration(seconds: 15))
           .onError((e, s) {