Minor refactor
This commit is contained in:
parent
45bf5ccfcb
commit
7b76206f49
1 changed files with 3 additions and 4 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Reference in a new issue