Skip to content

Commit

Permalink
Refactor BasemapGalleryItem equality logic
Browse files Browse the repository at this point in the history
  • Loading branch information
prathameshnarkhede committed Jun 12, 2024
1 parent e06432b commit 63a48bd
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -246,10 +246,10 @@ internal bool EqualsBasemap(Basemap? other)
return false;
}

return other == Basemap || (Basemap.BaseLayers.Count == other.BaseLayers.Count
&& Basemap.BaseLayers.All(layer => other?.BaseLayers.FirstOrDefault(l => l.Name == layer.Name) is not null))
|| (other.Item?.ItemId != null && other.Item?.ItemId == Basemap?.Item?.ItemId)
|| (other.Uri != null && other.Uri == Basemap?.Uri);
return other == Basemap || (other.Item?.ItemId != null && other.Item?.ItemId == Basemap?.Item?.ItemId)
|| (other.Uri != null && other.Uri == Basemap?.Uri)
|| (Basemap?.BaseLayers.Count == other.BaseLayers.Count
&& Basemap.BaseLayers.All(layer => other?.BaseLayers.FirstOrDefault(l => l.Name == layer.Name) is not null));
}

/// <inheritdoc />
Expand Down

0 comments on commit 63a48bd

Please sign in to comment.