fix
This commit is contained in:
parent
dd88656c02
commit
00a7eff5f8
@ -149,14 +149,14 @@ namespace AlicizaX.UI
|
||||
recyclerView.RebindVisibleDataRange(index, count);
|
||||
}
|
||||
|
||||
public virtual void NotifyItemInserted(int index)
|
||||
public virtual void NotifyItemInserted()
|
||||
{
|
||||
CoerceChoiceIndex();
|
||||
recyclerView.RequestLayout();
|
||||
recyclerView.Refresh();
|
||||
}
|
||||
|
||||
public virtual void NotifyItemRangeInserted(int index, int count)
|
||||
public virtual void NotifyItemRangeInserted(int count)
|
||||
{
|
||||
if (count <= 0)
|
||||
{
|
||||
@ -168,14 +168,14 @@ namespace AlicizaX.UI
|
||||
recyclerView.Refresh();
|
||||
}
|
||||
|
||||
public virtual void NotifyItemRemoved(int index)
|
||||
public virtual void NotifyItemRemoved()
|
||||
{
|
||||
CoerceChoiceIndex();
|
||||
recyclerView.RequestLayout();
|
||||
recyclerView.Refresh();
|
||||
}
|
||||
|
||||
public virtual void NotifyItemRangeRemoved(int index, int count)
|
||||
public virtual void NotifyItemRangeRemoved(int count)
|
||||
{
|
||||
if (count <= 0)
|
||||
{
|
||||
@ -252,7 +252,7 @@ namespace AlicizaX.UI
|
||||
}
|
||||
|
||||
list.Add(item);
|
||||
NotifyItemInserted(list.Count - 1);
|
||||
NotifyItemInserted();
|
||||
}
|
||||
|
||||
public void AddRange(IEnumerable<T> collection)
|
||||
@ -262,11 +262,10 @@ namespace AlicizaX.UI
|
||||
return;
|
||||
}
|
||||
|
||||
int startIndex = list.Count;
|
||||
list.AddRange(collection);
|
||||
if (collection is ICollection<T> itemCollection)
|
||||
{
|
||||
NotifyItemRangeInserted(startIndex, itemCollection.Count);
|
||||
NotifyItemRangeInserted(itemCollection.Count);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -276,7 +275,7 @@ namespace AlicizaX.UI
|
||||
public void Insert(int index, T item)
|
||||
{
|
||||
list.Insert(index, item);
|
||||
NotifyItemInserted(index);
|
||||
NotifyItemInserted();
|
||||
}
|
||||
|
||||
public void InsertRange(int index, IEnumerable<T> collection)
|
||||
@ -289,7 +288,7 @@ namespace AlicizaX.UI
|
||||
list.InsertRange(index, collection);
|
||||
if (collection is ICollection<T> itemCollection)
|
||||
{
|
||||
NotifyItemRangeInserted(index, itemCollection.Count);
|
||||
NotifyItemRangeInserted(itemCollection.Count);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -307,13 +306,13 @@ namespace AlicizaX.UI
|
||||
if (index < 0 || index >= GetItemCount()) return;
|
||||
|
||||
list.RemoveAt(index);
|
||||
NotifyItemRemoved(index);
|
||||
NotifyItemRemoved();
|
||||
}
|
||||
|
||||
public void RemoveRange(int index, int count)
|
||||
{
|
||||
list.RemoveRange(index, count);
|
||||
NotifyItemRangeRemoved(index, count);
|
||||
NotifyItemRangeRemoved(count);
|
||||
}
|
||||
|
||||
public void RemoveAll(Predicate<T> match)
|
||||
@ -331,7 +330,7 @@ namespace AlicizaX.UI
|
||||
|
||||
int count = list.Count;
|
||||
list.Clear();
|
||||
NotifyItemRangeRemoved(0, count);
|
||||
NotifyItemRangeRemoved(count);
|
||||
}
|
||||
|
||||
public void Reverse(int index, int count)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user