Minor refactor

This commit is contained in:
Vishnu Mohandas 2020-05-06 02:28:43 +05:30
parent 45bf5ccfcb
commit 7b76206f49

View file

@ -68,9 +68,9 @@ class _ZoomableImageState extends State<ZoomableImage> {
}
if (!_loadedFinalImage) {
final cachedImage = ImageLruCache.get(widget.photo);
if (cachedImage != null) {
_onFinalImageLoaded(cachedImage, context);
final cachedFile = ImageLruCache.get(widget.photo);
if (cachedFile != null) {
_onFinalImageLoaded(cachedFile, context);
} else {
widget.photo.getAsset().file.then((file) {
if (mounted) {
@ -105,7 +105,6 @@ class _ZoomableImageState extends State<ZoomableImage> {
});
}
});
_loadedLargeThumbnail = true;
}
void _onFinalImageLoaded(File file, BuildContext context) {