fix total user count in syncshell (distinct by UIDs)

This commit is contained in:
rootdarkarchon
2023-10-24 01:57:31 +02:00
parent 18d089d693
commit 82cca2e035
5 changed files with 17 additions and 13 deletions

View File

@@ -9,7 +9,8 @@ public class DrawGroupedGroupFolder : IDrawFolder
{
private readonly IEnumerable<IDrawFolder> _groups;
private readonly TagHandler _tagHandler;
public int OnlinePairs => _groups.Sum(g => g.OnlinePairs);
public IEnumerable<DrawUserPair> DrawPairs => throw new NotSupportedException();
public int OnlinePairs => _groups.SelectMany(g => g.DrawPairs).Where(g => g.Pair.IsOnline).DistinctBy(g => g.UID).Count();
public int TotalPairs => _groups.Sum(g => g.TotalPairs);
public DrawGroupedGroupFolder(IEnumerable<IDrawFolder> groups, TagHandler tagHandler)