Prechádzať zdrojové kódy

Load full image if thumbnail isn't available

Vishnu Mohandas 5 rokov pred
rodič
commit
1e336897d4
1 zmenil súbory, kde vykonal 6 pridanie a 5 odobranie
  1. 6 5
      lib/ui/thumbnail_widget.dart

+ 6 - 5
lib/ui/thumbnail_widget.dart

@@ -89,11 +89,12 @@ class _ThumbnailWidgetState extends State<ThumbnailWidget> {
   }
 
   void _loadNetworkImage() {
-    _imageProvider = Image.network(Configuration.instance.getHttpEndpoint() +
-                "/" +
-                widget.photo.thumbnailPath ??
-            widget.photo.remotePath)
-        .image;
+    final path = widget.photo.thumbnailPath.isNotEmpty
+        ? widget.photo.thumbnailPath
+        : widget.photo.remotePath;
+    _imageProvider =
+        Image.network(Configuration.instance.getHttpEndpoint() + "/" + path)
+            .image;
   }
 
   @override