make sure we invalidate cache when undoing deck add

This commit is contained in:
Damien Elmes 2021-03-10 23:59:40 +10:00
parent e122f8ae0d
commit c3b0589bb4

View File

@ -78,6 +78,7 @@ impl Collection {
}
fn remove_deck_undoable(&mut self, deck: Deck) -> Result<()> {
self.state.deck_cache.clear();
self.storage.remove_deck(deck.id)?;
self.save_undo(UndoableDeckChange::Removed(Box::new(deck)));
Ok(())