remove unnecessary list usage

This commit is contained in:
solarin 2020-04-06 11:15:43 +04:00
parent ce93c766c4
commit 27d680f526

View file

@ -582,7 +582,6 @@ namespace TLSharp.Core
int found = stIdx < 0 ? 0 : stIdx; int found = stIdx < 0 ? 0 : stIdx;
pageSize = pageSize < 0 ? DEFAULT_PAGE_SIZE : pageSize; pageSize = pageSize < 0 ? DEFAULT_PAGE_SIZE : pageSize;
List<TLChannelParticipants> results = new List<TLChannelParticipants>();
TLChannelParticipants ret = new TLChannelParticipants(); TLChannelParticipants ret = new TLChannelParticipants();
ret.Participants = new TLVector<TLAbsChannelParticipant>(); ret.Participants = new TLVector<TLAbsChannelParticipant>();
ret.Users = new TLVector<TLAbsUser>(); ret.Users = new TLVector<TLAbsUser>();
@ -603,7 +602,6 @@ namespace TLSharp.Core
var fchat = await SendRequestAsync<TLChannelParticipants>(req, token).ConfigureAwait(false); var fchat = await SendRequestAsync<TLChannelParticipants>(req, token).ConfigureAwait(false);
total = fchat.Count; total = fchat.Count;
found += fchat.Participants.Count; found += fchat.Participants.Count;
results.Add(fchat);
foreach (var p in fchat.Participants) foreach (var p in fchat.Participants)
ret.Participants.Add(p); ret.Participants.Add(p);
foreach (var u in fchat.Users) foreach (var u in fchat.Users)