This commit is contained in:
Nicolas Constant 2021-04-11 20:11:28 -04:00
parent e64d584ca0
commit 13026a56ad
No known key found for this signature in database
GPG Key ID: 1E9F677FB01A5688
1 changed files with 2 additions and 6 deletions

View File

@ -6,10 +6,9 @@ namespace BSLManager.Domain
{
public class FollowersListState
{
private List<string> _displayableUserList = new List<string>();
private List<Follower> _sourceUserList = new List<Follower>();
private readonly List<string> _filteredDisplayableUserList = new List<string>();
private List<string> _filteredDisplayableUserList = new List<string>();
private List<Follower> _sourceUserList = new List<Follower>();
private List<Follower> _filteredSourceUserList = new List<Follower>();
public void Load(List<Follower> followers)
@ -23,13 +22,11 @@ namespace BSLManager.Domain
{
_filteredSourceUserList = _sourceUserList.ToList();
_displayableUserList.Clear();
_filteredDisplayableUserList.Clear();
foreach (var follower in _sourceUserList)
{
var displayedUser = $"{GetFullHandle(follower)} ({follower.Followings.Count})";
_displayableUserList.Add(displayedUser);
_filteredDisplayableUserList.Add(displayedUser);
}
}
@ -71,7 +68,6 @@ namespace BSLManager.Domain
var sourceUser = _filteredSourceUserList[index];
_filteredDisplayableUserList.Remove(displayableUser);
_displayableUserList.Remove(displayableUser);
_filteredSourceUserList.Remove(sourceUser);
_sourceUserList.Remove(sourceUser);