From 035aa20790edf9ca37fa5580ae11595489c0e417 Mon Sep 17 00:00:00 2001 From: kernelkind Date: Thu, 6 Mar 2025 19:59:38 -0500 Subject: [PATCH] remove redudant arg Signed-off-by: kernelkind --- crates/notedeck_columns/src/ui/note/contents.rs | 6 +----- crates/notedeck_columns/src/ui/note/mod.rs | 3 --- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/crates/notedeck_columns/src/ui/note/contents.rs b/crates/notedeck_columns/src/ui/note/contents.rs index 2d595bbf..8c6d05fa 100644 --- a/crates/notedeck_columns/src/ui/note/contents.rs +++ b/crates/notedeck_columns/src/ui/note/contents.rs @@ -17,7 +17,6 @@ pub struct NoteContents<'a> { note_cache: &'a mut NoteCache, txn: &'a Transaction, note: &'a Note<'a>, - note_key: NoteKey, options: NoteOptions, action: Option, } @@ -30,7 +29,6 @@ impl<'a> NoteContents<'a> { note_cache: &'a mut NoteCache, txn: &'a Transaction, note: &'a Note, - note_key: NoteKey, options: ui::note::NoteOptions, ) -> Self { NoteContents { @@ -39,7 +37,6 @@ impl<'a> NoteContents<'a> { note_cache, txn, note, - note_key, options, action: None, } @@ -59,7 +56,6 @@ impl egui::Widget for &mut NoteContents<'_> { self.note_cache, self.txn, self.note, - self.note_key, self.options, ); self.action = result.action; @@ -136,12 +132,12 @@ fn render_note_contents( note_cache: &mut NoteCache, txn: &Transaction, note: &Note, - note_key: NoteKey, options: NoteOptions, ) -> NoteResponse { #[cfg(feature = "profiling")] puffin::profile_function!(); + let note_key = note.key().expect("todo: implement non-db notes"); let selectable = options.has_selectable_text(); let mut images: Vec<(String, MediaCacheType)> = vec![]; let mut note_action: Option = None; diff --git a/crates/notedeck_columns/src/ui/note/mod.rs b/crates/notedeck_columns/src/ui/note/mod.rs index 619386ab..95695ff7 100644 --- a/crates/notedeck_columns/src/ui/note/mod.rs +++ b/crates/notedeck_columns/src/ui/note/mod.rs @@ -180,7 +180,6 @@ impl<'a> NoteView<'a> { self.note_cache, txn, self.note, - note_key, self.flags, )); //}); @@ -423,7 +422,6 @@ impl<'a> NoteView<'a> { self.note_cache, txn, self.note, - note_key, self.options(), ); @@ -492,7 +490,6 @@ impl<'a> NoteView<'a> { self.note_cache, txn, self.note, - note_key, self.options(), ); ui.add(&mut contents);