add apply last received data

This commit is contained in:
rootdarkarchon
2023-01-30 11:46:17 +01:00
parent c403e7b45b
commit 66fb103c94
5 changed files with 24 additions and 6 deletions

View File

@@ -110,7 +110,15 @@ public class PairManager : IDisposable
public void AddUserPair(UserPairDto dto, bool addToLastAddedUser = true)
{
if (!_allClientPairs.ContainsKey(dto.User)) _allClientPairs[dto.User] = _pairFactory.Create();
if (!_allClientPairs.ContainsKey(dto.User))
{
_allClientPairs[dto.User] = _pairFactory.Create();
}
else
{
addToLastAddedUser = false;
}
_allClientPairs[dto.User].UserPair = dto;
if (addToLastAddedUser)
LastAddedUser = _allClientPairs[dto.User];