From 72b9b0dab97fc91ca3d9a00e587b29d2944aae11 Mon Sep 17 00:00:00 2001 From: William Casarin Date: Sun, 14 Apr 2024 16:23:01 -0700 Subject: [PATCH] ui: only inline preview kind1 notes for now Signed-off-by: William Casarin --- src/ui/note/contents.rs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/ui/note/contents.rs b/src/ui/note/contents.rs index 82498d5..d921a23 100644 --- a/src/ui/note/contents.rs +++ b/src/ui/note/contents.rs @@ -40,7 +40,15 @@ fn render_note_preview( _id_str: &str, ) -> egui::Response { let note = if let Ok(note) = app.ndb.get_note_by_id(txn, id) { - note + // TODO: support other preview kinds + if note.kind() == 1 { + note + } else { + return ui.colored_label( + Color32::RED, + format!("TODO: can't preview kind {}", note.kind()), + ); + } } else { return ui.colored_label(Color32::RED, "TODO: COULD NOT LOAD"); /*