commit 74f63f49caceccaf2983026166675d3f0ec71fe4 parent 9b7ee8d8c5c5b1df0fdaec487baada237483ec80 Author: William Casarin <jb55@jb55.com> Date: Tue, 4 Nov 2025 14:53:51 -0800 add is_root_note helper Signed-off-by: William Casarin <jb55@jb55.com> Diffstat:
| M | crates/notedeck_ui/src/note/mod.rs | | | 15 | +++++++++++++++ |
1 file changed, 15 insertions(+), 0 deletions(-)
diff --git a/crates/notedeck_ui/src/note/mod.rs b/crates/notedeck_ui/src/note/mod.rs @@ -844,6 +844,21 @@ fn zap_actionbar_button( action } +fn is_root_note(note: &Note) -> bool { + for tag in note.tags() { + if tag.count() < 2 { + continue; + } + + // any reference to an e tag is a non-root note + if tag.get_str(0) == Some("e") { + return false; + } + } + + true +} + #[profiling::function] fn render_note_actionbar( ui: &mut egui::Ui,