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();
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 {