mirror of
https://github.com/bitwarden/mobile.git
synced 2024-11-23 11:45:38 +01:00
loop on reset with range instead of clear
This commit is contained in:
parent
7a7ab7bd0e
commit
431804ea80
@ -30,7 +30,16 @@ namespace Bit.Core.Utilities
|
||||
|
||||
public void ResetWithRange(IEnumerable<T> range)
|
||||
{
|
||||
Items.Clear();
|
||||
// Maybe a fix for https://forums.xamarin.com/discussion/19114/invalid-number-of-rows-in-section
|
||||
// Items.Clear();
|
||||
if(Items.Count > 0)
|
||||
{
|
||||
var count = Items.Count;
|
||||
for(var i = 0; i < count; i++)
|
||||
{
|
||||
Items.RemoveAt(0);
|
||||
}
|
||||
}
|
||||
AddRange(range);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user