From: Olaf Wintermann Date: Sat, 30 May 2026 21:39:42 +0000 (+0200) Subject: remove unused load_note method X-Git-Url: https://uap-core.de/gitweb/?a=commitdiff_plain;h=HEAD;p=note.git remove unused load_note method --- diff --git a/application/src/notebook.rs b/application/src/notebook.rs index 917e09a..9693319 100644 --- a/application/src/notebook.rs +++ b/application/src/notebook.rs @@ -114,41 +114,6 @@ impl Notebook { } } - pub fn load_note(&self, note: &entity::note::Model) -> UiDoc { - // Create the new note - let note_data = crate::note::Note::new(self.collection_id, self.backend.clone()); - - // Create the note document object - UiDoc::new2(note_data, |n,d| { - // TODO: remove this when toolkit is not that buggy - // for some reason we have to attach the doc first, before we can - // set the text - if let Some(mut nb) = self.doc_ref.get_doc() { - nb.ctx.attach(&d); - } - - n.init_from_model(note); - - let proxy = d.doc_proxy(); - self.backend.get_note_content(note.note_id, move|result|{ - proxy.call_mainthread(|doc, note|{ - match result { - Ok(content) => { - if let Some(content) = content { - note.init_content(&content); - } else { - println!("note {}: no content", note.note_id); - } - }, - Err(e) => { - println!("Cannot get note content: {}", e); - } - } - }); - }); - }) - } - #[action] pub fn message(&mut self, _event: &ActionEvent) { while let Ok(msg) = self.broadcast_rx.try_recv() {