From: Olaf Wintermann Date: Tue, 28 Jul 2026 19:23:35 +0000 (+0200) Subject: remove unnecessary backend open_extern call in open_extern X-Git-Url: https://uap-core.de/gitweb/?a=commitdiff_plain;h=refs%2Fheads%2Fmain;p=note.git remove unnecessary backend open_extern call in open_extern --- diff --git a/application/note/src/file.rs b/application/note/src/file.rs index 077620c..d3f0779 100644 --- a/application/note/src/file.rs +++ b/application/note/src/file.rs @@ -149,28 +149,10 @@ impl FileNote { return; }; + // The path should exist, because query_local_path is called when creating this object if let Some(path) = &self.local_path { println!("open file: {}", path.to_string_lossy()); open_file(path.to_string_lossy().as_ref()); - } else if let NoteId::Id(note_id) = self.id { - self.is_opening = true; - let proxy = doc.doc_proxy(); - self.backend.open_extern(note_id, |result|{ - proxy.call_mainthread(move |_doc, note|{ - note.is_opening = false; - match result { - OpenExternResult::Ok((path, istmp)) => { - println!("open file: {}", path.to_string_lossy()); - open_file(path.to_string_lossy().as_ref()); - note.local_path = Some(path); - note.is_tmp_file = istmp; - } - _ => { - println!("open_extern failed"); - } - } - }); - }); } }