Don't call concat for every book.
This commit is contained in:
parent
7b8a4e4d72
commit
c28872544c
@ -190,10 +190,12 @@ namespace LibationWinForms
|
|||||||
string existingFilter = gridEntryBindingSource.Filter;
|
string existingFilter = gridEntryBindingSource.Filter;
|
||||||
|
|
||||||
//Add absent books to grid, or update current books
|
//Add absent books to grid, or update current books
|
||||||
|
|
||||||
|
var allItmes = bindingList.AllItems;
|
||||||
for (var i = dbBooks.Count - 1; i >= 0; i--)
|
for (var i = dbBooks.Count - 1; i >= 0; i--)
|
||||||
{
|
{
|
||||||
var libraryBook = dbBooks[i];
|
var libraryBook = dbBooks[i];
|
||||||
var existingItem = bindingList.AllItems.FirstOrDefault(i => i.AudibleProductId == libraryBook.Book.AudibleProductId);
|
var existingItem = allItmes.FirstOrDefault(i => i.AudibleProductId == libraryBook.Book.AudibleProductId);
|
||||||
|
|
||||||
// add new to top
|
// add new to top
|
||||||
if (existingItem is null)
|
if (existingItem is null)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user