From 3e75699b0bbcb70cbca9d7166573890bbbda4173 Mon Sep 17 00:00:00 2001 From: Reinaldo Neto Date: Mon, 24 Jul 2023 20:31:26 -0300 Subject: [PATCH] minor tweak in image --- app/containers/message/Image.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/containers/message/Image.tsx b/app/containers/message/Image.tsx index 9aca5f81f..f3c467ef0 100644 --- a/app/containers/message/Image.tsx +++ b/app/containers/message/Image.tsx @@ -98,6 +98,7 @@ const ImageContainer = React.memo( if (isDownloadActive(imgUrlToCache)) { return; } + setLoading(false); await handleAutoDownload(); } }; @@ -113,13 +114,12 @@ const ImageContainer = React.memo( const isAutoDownloadEnabled = fetchAutoDownloadEnabled('imagesPreferenceDownload'); if (isAutoDownloadEnabled || isCurrentUserAuthor) { await handleDownload(); - return; } - setLoading(false); }; const handleDownload = async () => { try { + setLoading(true); const imageUri = await downloadMediaFile({ downloadUrl: imgUrlToCache, type: 'image',