From: Olaf Wintermann Date: Tue, 4 Aug 2026 19:45:53 +0000 (+0200) Subject: fix id parameter when calling rename_note X-Git-Url: https://uap-core.de/gitweb/?a=commitdiff_plain;h=refs%2Fheads%2Fmain;p=note.git fix id parameter when calling rename_note --- diff --git a/application/backend/src/backend.rs b/application/backend/src/backend.rs index cf00571..53d5639 100644 --- a/application/backend/src/backend.rs +++ b/application/backend/src/backend.rs @@ -886,6 +886,13 @@ pub enum OpenExternResult { FsErr(Error) } +pub enum RenameNoteRet { + Ok, + NameAlreadyExists, + Error(DbErr), + FileError(Error) +} + impl SaveNoteResult { pub fn is_ok(&self) -> bool { matches!(self, SaveNoteResult::Ok(_)) diff --git a/application/note/src/note.rs b/application/note/src/note.rs index c8af18c..d71d7d3 100644 --- a/application/note/src/note.rs +++ b/application/note/src/note.rs @@ -495,7 +495,7 @@ impl Note { Ok(available) => { if available { let proxy = doc.doc_proxy(); - note.backend.rename_note(1, Some(new_nodename.clone()), None, |result|{ + note.backend.rename_note(note_id, Some(new_nodename.clone()), None, |result|{ proxy.call_mainthread(|_doc, note|{ match result { Ok(updated) => {