From 374dd9b36dec8d122078cb7ef10dd912fef32460 Mon Sep 17 00:00:00 2001 From: lukeflo Date: Thu, 17 Oct 2024 13:49:52 +0200 Subject: testwise rewrite entry table parsing --- src/frontend/app.rs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/frontend/app.rs') diff --git a/src/frontend/app.rs b/src/frontend/app.rs index 8d6454d..a035231 100644 --- a/src/frontend/app.rs +++ b/src/frontend/app.rs @@ -79,7 +79,7 @@ impl App { let biblio_data = BibiData::new(&main_biblio.bibliography, &main_biblio.citekeys); let tag_list = TagList::new(main_biblio.keyword_list.clone()); let search_struct = BibiSearch::default(); - let entry_table = EntryTable::from_iter(biblio_data.entry_list.bibentries.clone()); + let entry_table = EntryTable::new(&main_biblio.citekeys, &main_biblio.bibliography); let current_area = CurrentArea::EntryArea; Ok(Self { running, @@ -133,7 +133,8 @@ impl App { BibiData::new(&self.main_biblio.bibliography, &self.main_biblio.citekeys); // self.tag_list = TagList::from_iter(self.main_biblio.keyword_list.clone()); self.tag_list = TagList::new(self.main_biblio.keyword_list.clone()); - self.entry_table = EntryTable::from_iter(self.biblio_data.entry_list.bibentries.clone()); + self.entry_table = + EntryTable::new(&self.main_biblio.citekeys, &self.main_biblio.bibliography); } // Toggle moveable list between entries and tags @@ -157,7 +158,8 @@ impl App { } pub fn reset_current_list(&mut self) { - self.entry_table = EntryTable::from_iter(self.biblio_data.entry_list.bibentries.clone()); + self.entry_table = + EntryTable::new(&self.main_biblio.citekeys, &self.main_biblio.bibliography); self.tag_list = TagList::new(self.main_biblio.keyword_list.clone()); if let CurrentArea::TagArea = self.current_area { self.tag_list.tag_list_state.select(Some(0)) -- cgit v1.2.3