fix the loading in image and video at begin
This commit is contained in:
parent
b3f460598f
commit
b6dceecf50
|
@ -113,7 +113,9 @@ const ImageContainer = React.memo(
|
||||||
const isAutoDownloadEnabled = fetchAutoDownloadEnabled('imagesPreferenceDownload');
|
const isAutoDownloadEnabled = fetchAutoDownloadEnabled('imagesPreferenceDownload');
|
||||||
if (isAutoDownloadEnabled || isCurrentUserAuthor) {
|
if (isAutoDownloadEnabled || isCurrentUserAuthor) {
|
||||||
await handleDownload();
|
await handleDownload();
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
setLoading(false);
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleDownload = async () => {
|
const handleDownload = async () => {
|
||||||
|
|
|
@ -147,7 +147,9 @@ const Video = React.memo(
|
||||||
const isAutoDownloadEnabled = fetchAutoDownloadEnabled('videoPreferenceDownload');
|
const isAutoDownloadEnabled = fetchAutoDownloadEnabled('videoPreferenceDownload');
|
||||||
if (isAutoDownloadEnabled) {
|
if (isAutoDownloadEnabled) {
|
||||||
await handleDownload();
|
await handleDownload();
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
setLoading(false);
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleDownload = async () => {
|
const handleDownload = async () => {
|
||||||
|
|
Loading…
Reference in New Issue