From ceb8a4ac2025bed600848b179ef989867fad1787 Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Thu, 26 Oct 2023 09:49:24 +1000 Subject: [PATCH] Revert "Use scheduling flag instead of checking revlog when importing decks (#2730)" This reverts commit e1e0f2e1bd395e9b419f0c53a620e845af52f1f1. The previous change breaks the assumption on this line: DeckKind::Filtered(_) => unreachable!(), This will likely need a bigger refactor to handle this properly, and separate out importing of deck configs from other scheduling data. --- rslib/src/import_export/package/apkg/import/mod.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/rslib/src/import_export/package/apkg/import/mod.rs b/rslib/src/import_export/package/apkg/import/mod.rs index 7731bf323..f1093d9c4 100644 --- a/rslib/src/import_export/package/apkg/import/mod.rs +++ b/rslib/src/import_export/package/apkg/import/mod.rs @@ -47,7 +47,6 @@ struct Context<'a> { data: ExchangeData, usn: Usn, progress: ThrottlingProgressHandler, - with_scheduling: bool, } impl Collection { @@ -93,7 +92,6 @@ impl<'a> Context<'a> { merge_notetypes: options.merge_notetypes, update_notes: options.update_notes(), update_notetypes: options.update_notetypes(), - with_scheduling: options.with_scheduling, media_manager, archive, meta, @@ -113,7 +111,7 @@ impl<'a> Context<'a> { let mut media_map = self.prepare_media()?; let note_imports = self.import_notes_and_notetypes(&mut media_map)?; let keep_filtered = self.data.enables_filtered_decks(); - let contains_scheduling = self.with_scheduling; + let contains_scheduling = self.data.contains_scheduling(); let imported_decks = self.import_decks_and_configs(keep_filtered, contains_scheduling)?; self.import_cards_and_revlog( ¬e_imports.id_map,