Make AllItems a method
This commit is contained in:
parent
c28872544c
commit
aabc14c639
@ -191,7 +191,7 @@ namespace LibationWinForms
|
|||||||
|
|
||||||
//Add absent books to grid, or update current books
|
//Add absent books to grid, or update current books
|
||||||
|
|
||||||
var allItmes = bindingList.AllItems;
|
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];
|
||||||
@ -216,7 +216,7 @@ namespace LibationWinForms
|
|||||||
// note: actual deletion from db must still occur via the RemoveBook feature. deleting from audible will not trigger this
|
// note: actual deletion from db must still occur via the RemoveBook feature. deleting from audible will not trigger this
|
||||||
var removedBooks =
|
var removedBooks =
|
||||||
bindingList
|
bindingList
|
||||||
.AllItems
|
.AllItems()
|
||||||
.ExceptBy(dbBooks.Select(lb => lb.Book.AudibleProductId), ge => ge.AudibleProductId)
|
.ExceptBy(dbBooks.Select(lb => lb.Book.AudibleProductId), ge => ge.AudibleProductId)
|
||||||
.ToList();
|
.ToList();
|
||||||
|
|
||||||
|
|||||||
@ -58,7 +58,7 @@ namespace LibationWinForms
|
|||||||
base.Remove(entry);
|
base.Remove(entry);
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<GridEntry> AllItems => Items.Concat(FilterRemoved).ToList();
|
public List<GridEntry> AllItems() => Items.Concat(FilterRemoved).ToList();
|
||||||
|
|
||||||
private void ApplyFilter(string filterString)
|
private void ApplyFilter(string filterString)
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user