ui: only inline preview kind1 notes for now
Signed-off-by: William Casarin <jb55@jb55.com>
This commit is contained in:
@@ -40,7 +40,15 @@ fn render_note_preview(
|
|||||||
_id_str: &str,
|
_id_str: &str,
|
||||||
) -> egui::Response {
|
) -> egui::Response {
|
||||||
let note = if let Ok(note) = app.ndb.get_note_by_id(txn, id) {
|
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 {
|
} else {
|
||||||
return ui.colored_label(Color32::RED, "TODO: COULD NOT LOAD");
|
return ui.colored_label(Color32::RED, "TODO: COULD NOT LOAD");
|
||||||
/*
|
/*
|
||||||
|
|||||||
Reference in New Issue
Block a user