From bf33580a66c1f8ce87e85bea701415788a887401 Mon Sep 17 00:00:00 2001 From: bobzel Date: Wed, 11 Jun 2025 11:50:45 -0400 Subject: change how autoTag is triggered for images to not use a reaction --- src/client/views/search/FaceRecognitionHandler.tsx | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'src/client/views/search') diff --git a/src/client/views/search/FaceRecognitionHandler.tsx b/src/client/views/search/FaceRecognitionHandler.tsx index 256e68afd..dac91b89a 100644 --- a/src/client/views/search/FaceRecognitionHandler.tsx +++ b/src/client/views/search/FaceRecognitionHandler.tsx @@ -9,7 +9,6 @@ import { ImageField } from '../../../fields/URLField'; import { DocumentType } from '../../documents/DocumentTypes'; import { Docs } from '../../documents/Documents'; import { DocumentManager } from '../../util/DocumentManager'; -import { reaction } from 'mobx'; import { DocumentView } from '../nodes/DocumentView'; /** @@ -210,9 +209,7 @@ export class FaceRecognitionHandler { } else if (imgDoc.type === DocumentType.LOADING && !imgDoc.loadingError) { setTimeout(() => this.classifyFacesInImage(imgDocView), 1000); } else { - reaction(() => ({sel:imgDocView.isSelected()}), ({sel}) => !sel && - imgDocView.ComponentView?.autoTag?.(), {fireImmediately: true} - ) + imgDocView.ComponentView?.autoTag?.(); const imgUrl = ImageCast(imgDoc[Doc.LayoutDataKey(imgDoc)]); if (imgUrl && !DocListCast(Doc.MyFaceCollection?.examinedFaceDocs).includes(imgDoc[DocData])) { // only examine Docs that have an image and that haven't already been examined. -- cgit v1.2.3-70-g09d2