notedeck

One damus client to rule them all
git clone git://jb55.com/notedeck
Log | Files | Refs | README | LICENSE

commit 72b9b0dab97fc91ca3d9a00e587b29d2944aae11
parent dcd53beea89ba96f20d78c9c74c5d6cc8adae296
Author: William Casarin <jb55@jb55.com>
Date:   Sun, 14 Apr 2024 16:23:01 -0700

ui: only inline preview kind1 notes for now

Signed-off-by: William Casarin <jb55@jb55.com>

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