Fix condition to skip image load
This commit is contained in:
parent
83ae85b74a
commit
661b1ceb0e
1 changed files with 2 additions and 6 deletions
|
@ -113,11 +113,6 @@ class _ZoomableImageState extends State<ZoomableImage>
|
|||
}
|
||||
|
||||
void _loadNetworkImage() {
|
||||
if (_loadingFinalImage) {
|
||||
return;
|
||||
} else {
|
||||
_loadingFinalImage = true;
|
||||
}
|
||||
if (!_loadedSmallThumbnail && !_loadedFinalImage) {
|
||||
final cachedThumbnail = ThumbnailInMemoryLruCache.get(_photo);
|
||||
if (cachedThumbnail != null) {
|
||||
|
@ -144,7 +139,8 @@ class _ZoomableImageState extends State<ZoomableImage>
|
|||
});
|
||||
}
|
||||
}
|
||||
if (!_loadedFinalImage) {
|
||||
if (!_loadedFinalImage && !_loadingFinalImage) {
|
||||
_loadingFinalImage = true;
|
||||
getFileFromServer(_photo).then((file) {
|
||||
_onFinalImageLoaded(
|
||||
Image.file(
|
||||
|
|
Loading…
Add table
Reference in a new issue