mirror of
https://github.com/Caraxi/mare.client.git
synced 2025-12-12 19:27:21 +01:00
Add DTR entry with number of visible pairs (#52)
* Add DTR entry with number of visible pairs * Simplify DTR visible pair counter - Merge the new PairHandlerInvisibleMessage and PairHandlerVisibleDisposedMessage ; - Leave alone a bunch of messages that were actually unneccessary. * Match encodings with the rest of the codebase * Make the DTR entry opt-in and add explanations * More reliable publishing of PairHandlerVisible/Invisible * Simplify things for DTR * Rework async
This commit is contained in:
parent
de36e9e8bd
commit
0e84d312dc
5 changed files with 115 additions and 1 deletions
|
|
@ -90,6 +90,8 @@ public sealed class PairManager : DisposableMediatorSubscriberBase
|
|||
|
||||
public List<UserData> GetVisibleUsers() => _allClientPairs.Where(p => p.Value.IsVisible).Select(p => p.Key).ToList();
|
||||
|
||||
public int GetVisibleUserCount() => _allClientPairs.Count(p => p.Value.IsVisible);
|
||||
|
||||
public void MarkPairOffline(UserData user)
|
||||
{
|
||||
if (_allClientPairs.TryGetValue(user, out var pair))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue