mirror of
https://github.com/ankitects/anki.git
synced 2025-09-18 22:12:21 -04:00
Fix newly-added image occlusion notetype not syncing
https://forums.ankiweb.net/t/synchronisation-issue/31505/7
This commit is contained in:
parent
85c2769f80
commit
5149cd13d4
1 changed files with 3 additions and 1 deletions
|
@ -20,8 +20,10 @@ impl Collection {
|
||||||
pub fn add_image_occlusion_notetype_inner(&mut self) -> Result<()> {
|
pub fn add_image_occlusion_notetype_inner(&mut self) -> Result<()> {
|
||||||
if self.get_first_io_notetype()?.is_none() {
|
if self.get_first_io_notetype()?.is_none() {
|
||||||
let mut nt = image_occlusion_notetype(&self.tr);
|
let mut nt = image_occlusion_notetype(&self.tr);
|
||||||
|
let usn = self.usn()?;
|
||||||
|
nt.set_modified(usn);
|
||||||
let current_id = self.get_current_notetype_id();
|
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 {
|
if let Some(current_id) = current_id {
|
||||||
// preserve previous default
|
// preserve previous default
|
||||||
self.set_current_notetype_id(current_id)?;
|
self.set_current_notetype_id(current_id)?;
|
||||||
|
|
Loading…
Reference in a new issue