add silent detection - don't send to queue if enable

This commit is contained in:
Alex Bezdieniezhnykh
2025-04-27 21:43:45 +03:00
parent 5ff4ee58b9
commit 47aa8b862b
9 changed files with 18 additions and 12 deletions
+1
View File
@@ -5,4 +5,5 @@ public class UIConfig
public double LeftPanelWidth { get; set; }
public double RightPanelWidth { get; set; }
public bool GenerateAnnotatedImage { get; set; }
public bool SilentDetection { get; set; }
}
+1 -1
View File
@@ -176,7 +176,7 @@ public class AnnotationService : INotificationHandler<AnnotationsDeletedEvent>
if (_uiConfig.GenerateAnnotatedImage)
await _galleryService.CreateAnnotatedImage(annotation, token);
if (!fromQueue) //Send to queue only if we're not getting from queue already
if (!fromQueue && !_uiConfig.SilentDetection) //Send to queue only if we're not getting from queue already
await _producer.SendToInnerQueue(annotation, token);
await _mediator.Publish(new AnnotationCreatedEvent(annotation), token);