From 5149cd13d44bca3f285447a11f4df2555c329553 Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Sat, 1 Jul 2023 22:10:29 +1000 Subject: [PATCH] Fix newly-added image occlusion notetype not syncing https://forums.ankiweb.net/t/synchronisation-issue/31505/7 --- rslib/src/image_occlusion/notetype.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/rslib/src/image_occlusion/notetype.rs b/rslib/src/image_occlusion/notetype.rs index 988afcb64..497793aa1 100644 --- a/rslib/src/image_occlusion/notetype.rs +++ b/rslib/src/image_occlusion/notetype.rs @@ -20,8 +20,10 @@ impl Collection { pub fn add_image_occlusion_notetype_inner(&mut self) -> Result<()> { if self.get_first_io_notetype()?.is_none() { let mut nt = image_occlusion_notetype(&self.tr); + let usn = self.usn()?; + nt.set_modified(usn); let current_id = self.get_current_notetype_id(); - self.add_notetype_inner(&mut nt, self.usn()?, false)?; + self.add_notetype_inner(&mut nt, usn, false)?; if let Some(current_id) = current_id { // preserve previous default self.set_current_notetype_id(current_id)?;