From 5130c76413f99368da59bcecc6918b3d76c00185 Mon Sep 17 00:00:00 2001 From: Mike Phares Date: Sun, 6 Aug 2023 17:36:54 -0700 Subject: [PATCH] ignoreXMatches --- Map/Models/MapLogic.cs | 7 +++---- Shared/Models/Properties/IMapping.cs | 2 -- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/Map/Models/MapLogic.cs b/Map/Models/MapLogic.cs index ff616dc..41d8fff 100644 --- a/Map/Models/MapLogic.cs +++ b/Map/Models/MapLogic.cs @@ -1371,17 +1371,16 @@ public class MapLogic : Shared.Models.Methods.IMapLogic public bool IsUsed(bool ignoreXMatches, int id, MappingFromLocation mappingFromLocation) { bool result; - ReadOnlyCollection? personContainers; List? wholePercentagesCollection; + ReadOnlyCollection? personContainers; ReadOnlyDictionary>? wholePercentagesToPersonContainers; result = _SkipCollection.TryGetValue(id, out wholePercentagesCollection) && wholePercentagesCollection.Contains(mappingFromLocation.WholePercentages); if (!result && _IdThenWholePercentagesToPersonContainers.TryGetValue(id, out wholePercentagesToPersonContainers)) { if (wholePercentagesToPersonContainers.TryGetValue(mappingFromLocation.WholePercentages, out personContainers)) { - result = true; - // if (!ignoreXMatches || personContainers.All(l => l.ApproximateYears is null && l.DisplayDirectoryName.First() != 'X')) - // result = true; + if (!ignoreXMatches || personContainers.All(l => l.ApproximateYears is null && l.DisplayDirectoryName.First() != 'X')) + result = true; } } return result; diff --git a/Shared/Models/Properties/IMapping.cs b/Shared/Models/Properties/IMapping.cs index 05c351b..5093be5 100644 --- a/Shared/Models/Properties/IMapping.cs +++ b/Shared/Models/Properties/IMapping.cs @@ -1,5 +1,3 @@ -using System.Collections.ObjectModel; - namespace View_by_Distance.Shared.Models.Properties; public interface IMapping