Fixed cross thread bug and Enumerable change bug.
This commit is contained in:
parent
6ed1307443
commit
1040a347c6
@ -58,7 +58,7 @@ namespace LibationWinForms.Dialogs
|
||||
{
|
||||
var removedBooks = await LibraryCommands.FindInactiveBooks((account) => new WinformResponder(account), _libraryBooks, _accounts);
|
||||
|
||||
var removable = _removableGridEntries.Where(rge => removedBooks.Any(rb => rb.Book.AudibleProductId == rge.AudibleProductId));
|
||||
var removable = _removableGridEntries.Where(rge => removedBooks.Any(rb => rb.Book.AudibleProductId == rge.AudibleProductId)).ToList();
|
||||
|
||||
if (!removable.Any())
|
||||
return;
|
||||
|
||||
@ -151,7 +151,7 @@ namespace LibationWinForms
|
||||
{
|
||||
if (currProductsGrid != null)
|
||||
{
|
||||
gridPanel.Controls.Remove(currProductsGrid);
|
||||
gridPanel.UIThread(() => gridPanel.Controls.Remove(currProductsGrid));
|
||||
currProductsGrid.VisibleCountChanged -= setVisibleCount;
|
||||
currProductsGrid.Dispose();
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user