From b36fca8b4be1f41da6b1299f7b5cc2b1b278d56c Mon Sep 17 00:00:00 2001 From: Olaf Wintermann Date: Wed, 12 Aug 2026 20:16:34 +0200 Subject: [PATCH] show external modification info panel, when reattaching a note, that was modified by an external program --- application/note/src/note.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/application/note/src/note.rs b/application/note/src/note.rs index fa100a6..3f09c8e 100644 --- a/application/note/src/note.rs +++ b/application/note/src/note.rs @@ -123,7 +123,7 @@ impl Note { n.doc = d.doc_ref(); if n.id.is_new() { n.init_new(); - d.ctx.suppress_state(AppStates::NoteEnableNew as i32); + d.ctx.suppress_state(AppStates::NoteEnableNew); } else { n.init_from_model(model); n.load_content(); @@ -177,11 +177,12 @@ impl Note { if let Some(path) = &self.local_path && self.local_lastmodified.is_some() { let proxy = doc.doc_proxy(); self.backend.get_file_metadata(path.as_path(), |result| { - proxy.call_mainthread(|_doc, note| { + proxy.call_mainthread(|doc, note| { match result { Ok(metadata) => { if let Ok(lm) = metadata.modified() && let Some(lastmodified) = note.local_lastmodified { if lastmodified != lm { + doc.ctx.set_state(AppStates::NoteShowExtModInfo); println!("note was changed"); } } else { -- 2.52.0