From: Olaf Wintermann Date: Mon, 31 Aug 2026 19:25:26 +0000 (+0200) Subject: reload attachment list when a new attachment is added X-Git-Url: https://uap-core.de/gitweb/?a=commitdiff_plain;h=refs%2Fheads%2Fmain;p=note.git reload attachment list when a new attachment is added --- 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);