From da8927d6189d2c79056db616f7e54265ec977ac6 Mon Sep 17 00:00:00 2001 From: Olaf Wintermann Date: Mon, 31 Aug 2026 21:25:26 +0200 Subject: [PATCH] reload attachment list when a new attachment is added --- application/note/src/note.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/application/note/src/note.rs b/application/note/src/note.rs index 87acdc7..4ee6d08 100644 --- a/application/note/src/note.rs +++ b/application/note/src/note.rs @@ -578,10 +578,12 @@ impl Note { if let EventType::FileList(file_selection) = event.event_type && let Some(file) = file_selection.get(0) { let path = Path::new(file); backend.add_note_attachment(note_id, path, move|result|{ - proxy.call_mainthread(|_doc, _note|{ + proxy.call_mainthread(|_doc, note|{ match result { Ok((attachment, content)) => { println!("attachment: {} id: {}", attachment.attachment_id, content.attachment_id); + // reload attachments + note.load_attachments(); }, Err(e) => { println!("cannot add attachment: {}", e); -- 2.52.0