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:
N. Lo
2023-06-18 23:01:39 +02:00
committed by GitHub
parent de36e9e8bd
commit 0e84d312dc
5 changed files with 115 additions and 1 deletions

View File

@@ -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))