commit 035aa20790edf9ca37fa5580ae11595489c0e417
parent e3eab0dfa89609f5a7994be5e086a99aa4b81ee7
Author: kernelkind <kernelkind@gmail.com>
Date: Thu, 6 Mar 2025 19:59:38 -0500
remove redudant arg
Signed-off-by: kernelkind <kernelkind@gmail.com>
Diffstat:
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
@@ -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<NoteAction>,
}
@@ -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<NoteAction> = None;
diff --git 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);