mirror of
https://github.com/ente-io/ente.git
synced 2025-08-08 07:28:26 +00:00
Don't initialize face DB in non-desktop builds
This commit is contained in:
parent
14bfaf97f3
commit
a73e7af704
@ -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}
|
||||
|
@ -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 [];
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user