Don't initialize face DB in non-desktop builds

This commit is contained in:
Manav Rathi 2025-02-28 16:42:50 +05:30
parent 14bfaf97f3
commit a73e7af704
No known key found for this signature in database
2 changed files with 4 additions and 1 deletions

View File

@ -200,6 +200,7 @@ export const FileInfo: React.FC<FileInfoProps> = ({
useEffect(() => {
if (!file) return;
if (!isMLEnabled()) return;
let didCancel = false;
@ -317,7 +318,7 @@ export const FileInfo: React.FC<FileInfoProps> = ({
)
}
/>
{isMLEnabled() && annotatedFaces.length > 0 && (
{annotatedFaces.length > 0 && (
<InfoItem icon={<FaceRetouchingNaturalIcon />}>
<FilePeopleList
file={file}

View File

@ -654,6 +654,8 @@ export interface AnnotatedFaceID {
export const getAnnotatedFacesForFile = async (
file: EnteFile,
): Promise<AnnotatedFaceID[]> => {
if (!isMLEnabled()) return [];
const index = await savedFaceIndex(file.id);
if (!index) return [];