mirror of
https://github.com/Caraxi/mare.client.git
synced 2025-12-15 04:34:15 +01:00
fix total user count in syncshell (distinct by UIDs)
This commit is contained in:
parent
18d089d693
commit
82cca2e035
5 changed files with 17 additions and 13 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue