check if deck changed before saving

This commit is contained in:
Damien Elmes 2021-04-20 19:50:31 +10:00
parent 55277aa90a
commit 42d5d8071d

View File

@ -59,6 +59,9 @@ impl Collection {
usn: Usn,
) -> Result<()> {
self.prepare_deck_for_update(deck, usn)?;
if deck == &original {
return Ok(());
}
deck.set_modified(usn);
let name_changed = original.name != deck.name;
if name_changed {