mirror of
https://github.com/azaion/annotations.git
synced 2026-04-22 15:06:29 +00:00
huge queue refactoring:
3 queues -> 1 queue send delete validate updates
This commit is contained in:
@@ -99,7 +99,7 @@ public class DatasetExplorerEventHandler(
|
||||
var annotations = datasetExplorer.ThumbnailsView.SelectedItems.Cast<AnnotationThumbnail>()
|
||||
.Select(x => x.Annotation)
|
||||
.ToList();
|
||||
await annotationService.ValidateAnnotations(annotations, cancellationToken);
|
||||
await annotationService.ValidateAnnotations(annotations.Select(x => x.Name).ToList(), token: cancellationToken);
|
||||
foreach (var ann in datasetExplorer.SelectedAnnotations.Where(x => annotations.Contains(x.Annotation)))
|
||||
{
|
||||
ann.Annotation.AnnotationStatus = AnnotationStatus.Validated;
|
||||
@@ -143,9 +143,8 @@ public class DatasetExplorerEventHandler(
|
||||
|
||||
public async Task Handle(AnnotationsDeletedEvent notification, CancellationToken cancellationToken)
|
||||
{
|
||||
var names = notification.Annotations.Select(x => x.Name).ToList();
|
||||
var annThumbs = datasetExplorer.SelectedAnnotationDict
|
||||
.Where(x => names.Contains(x.Key))
|
||||
.Where(x => notification.AnnotationNames.Contains(x.Key))
|
||||
.Select(x => x.Value)
|
||||
.ToList();
|
||||
foreach (var annThumb in annThumbs)
|
||||
|
||||
Reference in New Issue
Block a user