mirror of
https://github.com/aljazceru/notedeck.git
synced 2025-12-22 02:34:20 +01:00
@@ -3,6 +3,7 @@ pub mod context;
|
||||
pub mod options;
|
||||
pub mod reply_description;
|
||||
|
||||
use crate::jobs::JobsCache;
|
||||
use crate::{
|
||||
profile::name::one_line_display_name_widget, widgets::x_button, ImagePulseTint, ProfilePic,
|
||||
ProfilePreview, Username,
|
||||
@@ -32,6 +33,7 @@ pub struct NoteView<'a, 'd> {
|
||||
note: &'a nostrdb::Note<'a>,
|
||||
framed: bool,
|
||||
flags: NoteOptions,
|
||||
jobs: &'a mut JobsCache,
|
||||
}
|
||||
|
||||
pub struct NoteResponse {
|
||||
@@ -73,6 +75,7 @@ impl<'a, 'd> NoteView<'a, 'd> {
|
||||
cur_acc: &'a Option<KeypairUnowned<'a>>,
|
||||
note: &'a nostrdb::Note<'a>,
|
||||
mut flags: NoteOptions,
|
||||
jobs: &'a mut JobsCache,
|
||||
) -> Self {
|
||||
flags.set_actionbar(true);
|
||||
flags.set_note_previews(true);
|
||||
@@ -87,6 +90,7 @@ impl<'a, 'd> NoteView<'a, 'd> {
|
||||
note,
|
||||
flags,
|
||||
framed,
|
||||
jobs,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -212,6 +216,7 @@ impl<'a, 'd> NoteView<'a, 'd> {
|
||||
txn,
|
||||
self.note,
|
||||
self.flags,
|
||||
self.jobs,
|
||||
));
|
||||
//});
|
||||
})
|
||||
@@ -326,7 +331,14 @@ impl<'a, 'd> NoteView<'a, 'd> {
|
||||
.text_style(style.text_style()),
|
||||
);
|
||||
});
|
||||
NoteView::new(self.note_context, self.cur_acc, ¬e_to_repost, self.flags).show(ui)
|
||||
NoteView::new(
|
||||
self.note_context,
|
||||
self.cur_acc,
|
||||
¬e_to_repost,
|
||||
self.flags,
|
||||
self.jobs,
|
||||
)
|
||||
.show(ui)
|
||||
} else {
|
||||
self.show_standard(ui)
|
||||
}
|
||||
@@ -426,6 +438,7 @@ impl<'a, 'd> NoteView<'a, 'd> {
|
||||
¬e_reply,
|
||||
self.note_context,
|
||||
self.flags,
|
||||
self.jobs,
|
||||
)
|
||||
})
|
||||
.inner;
|
||||
@@ -437,8 +450,14 @@ impl<'a, 'd> NoteView<'a, 'd> {
|
||||
});
|
||||
});
|
||||
|
||||
let mut contents =
|
||||
NoteContents::new(self.note_context, self.cur_acc, txn, self.note, self.flags);
|
||||
let mut contents = NoteContents::new(
|
||||
self.note_context,
|
||||
self.cur_acc,
|
||||
txn,
|
||||
self.note,
|
||||
self.flags,
|
||||
self.jobs,
|
||||
);
|
||||
|
||||
ui.add(&mut contents);
|
||||
|
||||
@@ -489,6 +508,7 @@ impl<'a, 'd> NoteView<'a, 'd> {
|
||||
¬e_reply,
|
||||
self.note_context,
|
||||
self.flags,
|
||||
self.jobs,
|
||||
);
|
||||
|
||||
if action.is_some() {
|
||||
@@ -503,6 +523,7 @@ impl<'a, 'd> NoteView<'a, 'd> {
|
||||
txn,
|
||||
self.note,
|
||||
self.flags,
|
||||
self.jobs,
|
||||
);
|
||||
ui.add(&mut contents);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user