minor tweak in image
This commit is contained in:
parent
7e81d41eec
commit
3e75699b0b
|
@ -98,6 +98,7 @@ const ImageContainer = React.memo(
|
||||||
if (isDownloadActive(imgUrlToCache)) {
|
if (isDownloadActive(imgUrlToCache)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
setLoading(false);
|
||||||
await handleAutoDownload();
|
await handleAutoDownload();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -113,13 +114,12 @@ 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 () => {
|
||||||
try {
|
try {
|
||||||
|
setLoading(true);
|
||||||
const imageUri = await downloadMediaFile({
|
const imageUri = await downloadMediaFile({
|
||||||
downloadUrl: imgUrlToCache,
|
downloadUrl: imgUrlToCache,
|
||||||
type: 'image',
|
type: 'image',
|
||||||
|
|
Loading…
Reference in New Issue