ui: only inline preview kind1 notes for now

Signed-off-by: William Casarin <jb55@jb55.com>
This commit is contained in:
William Casarin
2024-04-14 16:23:01 -07:00
parent dcd53beea8
commit 72b9b0dab9

View File

@@ -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");
/*