From 85c5c4406f36e2a58eedea0cf570a0fe16626239 Mon Sep 17 00:00:00 2001 From: Olaf Wintermann Date: Tue, 28 Jul 2026 21:23:35 +0200 Subject: [PATCH] remove unnecessary backend open_extern call in open_extern --- application/note/src/file.rs | 20 +------------------- 1 file changed, 1 insertion(+), 19 deletions(-) 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"); - } - } - }); - }); } } -- 2.52.0