fix exif never loads for second file

This commit is contained in:
Abhinav 2022-11-25 12:55:32 +05:30
parent 63d7b3c21f
commit a622ac2885

View file

@ -318,10 +318,7 @@ function PhotoViewer(props: Iprops) {
} }
}; };
const checkExifAvailable = async (force?: boolean) => { const checkExifAvailable = async () => {
if (exif || !force) {
return;
}
await sleep(100); await sleep(100);
try { try {
const img: HTMLImageElement = document.querySelector( const img: HTMLImageElement = document.querySelector(
@ -344,7 +341,7 @@ function PhotoViewer(props: Iprops) {
const file: EnteFile = this?.currItem; const file: EnteFile = this?.currItem;
if (file) { if (file) {
setExif(undefined); setExif(undefined);
checkExifAvailable(true); checkExifAvailable();
} }
} }