1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-17 07:41:26 +00:00

optimize people cover cache (#7534)

This commit is contained in:
JoinTyang
2025-03-01 10:05:51 +08:00
committed by GitHub
parent 21f96dd369
commit 67083238c2
2 changed files with 12 additions and 1 deletions

View File

@@ -12,7 +12,11 @@ const People = ({ haveFreezed, people, onOpenPeople, onRename, onFreezed, onUnFr
const similarPhotoURL = useMemo(() => {
const repoID = window.sfMetadataContext.getSetting('repoID');
return `${siteRoot}thumbnail/${repoID}/${thumbnailDefaultSize}/_Internal/Faces/${people._id}.jpg`;
let photoURL = `${siteRoot}thumbnail/${repoID}/${thumbnailDefaultSize}/_Internal/Faces/${people._id}.jpg`;
if (people._name === '_Unknown_people') {
return photoURL;
}
return `${photoURL}?t=${people.file_mtime}`;
}, [people]);
const onImgLoadError = useCallback(() => {