Skip to content

Commit

Permalink
Deduplicate Server List (#13)
Browse files Browse the repository at this point in the history
Closes #10
  • Loading branch information
DEATHB4DEFEAT authored Dec 24, 2024
1 parent 324cf60 commit 671090d
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Collections.Specialized;
using System.Linq;
using ReactiveUI;
using ReactiveUI.Fody.Helpers;
using Splat;
Expand Down Expand Up @@ -126,6 +127,9 @@ private void UpdateSearchedList()
sortList.Add(server);
}

// Deduplicate servers
sortList = sortList.Select(s => s.Address).Distinct().Select(a => sortList.First(s => s.Address == a)).ToList();

Filters.ApplyFilters(sortList);

sortList.Sort(ServerSortComparer.Instance);
Expand Down

0 comments on commit 671090d

Please sign in to comment.