Browse Source

Prevent multiple load image calls

vishnukvmd 2 years ago
parent
commit
169831dec7
1 changed files with 5 additions and 0 deletions
  1. 5 0
      lib/ui/viewer/file/zoomable_image.dart

+ 5 - 0
lib/ui/viewer/file/zoomable_image.dart

@@ -113,6 +113,11 @@ class _ZoomableImageState extends State<ZoomableImage>
   }
 
   void _loadNetworkImage() {
+    if (_loadingFinalImage) {
+      return;
+    } else {
+      _loadingFinalImage = true;
+    }
     if (!_loadedSmallThumbnail && !_loadedFinalImage) {
       final cachedThumbnail = ThumbnailInMemoryLruCache.get(_photo);
       if (cachedThumbnail != null) {