fix exif never loads for second file
This commit is contained in:
parent
63d7b3c21f
commit
a622ac2885
|
@ -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();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue