fix the loading in image and video at begin

This commit is contained in:
Reinaldo Neto 2023-07-04 15:16:26 -03:00
parent b3f460598f
commit b6dceecf50
2 changed files with 4 additions and 0 deletions

View File

@ -113,7 +113,9 @@ const ImageContainer = React.memo(
const isAutoDownloadEnabled = fetchAutoDownloadEnabled('imagesPreferenceDownload');
if (isAutoDownloadEnabled || isCurrentUserAuthor) {
await handleDownload();
return;
}
setLoading(false);
};
const handleDownload = async () => {

View File

@ -147,7 +147,9 @@ const Video = React.memo(
const isAutoDownloadEnabled = fetchAutoDownloadEnabled('videoPreferenceDownload');
if (isAutoDownloadEnabled) {
await handleDownload();
return;
}
setLoading(false);
};
const handleDownload = async () => {