Ensure that thumbnail does not replace the hidef image

This commit is contained in:
Vishnu Mohandas 2020-06-24 01:42:43 +05:30
parent 060cc2b41b
commit 45611be9b2

View file

@ -68,7 +68,9 @@ class _ZoomableImageState extends State<ZoomableImage>
}
void _loadNetworkImage() {
if (!_loadedSmallThumbnail && widget.photo.previewURL.isNotEmpty) {
if (!_loadedSmallThumbnail &&
!_loadedFinalImage &&
widget.photo.previewURL.isNotEmpty) {
_imageProvider =
CachedNetworkImageProvider(widget.photo.getThumbnailUrl());
_loadedSmallThumbnail = true;