Skip to content

Commit

Permalink
Fix crash when removing from non dispatcher thread
Browse files Browse the repository at this point in the history
  • Loading branch information
DSPaul committed Nov 1, 2024
1 parent 58b9658 commit c61d860
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/ViewModels/FilterViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -534,10 +534,13 @@ public void ReFilter(bool force = false)
Logger.Warn("Something when wrong during filtering", ex);
}
}

public void RemoveCodex(Codex c)
{
_excludedCodices.Remove(c);
FilteredCodices?.Remove(c);

//Changes to CollectionView Should always be done from dispatcher thread
App.SafeDispatcher.Invoke(() => FilteredCodices?.Remove(c));
}

#endregion
Expand Down

0 comments on commit c61d860

Please sign in to comment.