]> uap-core.de Git - note.git/commitdiff
fix id parameter when calling rename_note main
authorOlaf Wintermann <olaf.wintermann@gmail.com>
Tue, 4 Aug 2026 19:45:53 +0000 (21:45 +0200)
committerOlaf Wintermann <olaf.wintermann@gmail.com>
Tue, 4 Aug 2026 19:45:53 +0000 (21:45 +0200)
application/backend/src/backend.rs
application/note/src/note.rs

index cf005717aa87e4808a8adbf5879e2fdca8d3e739..53d563988ebe677f1cc8c4cbd6ff8d24e9b16a41 100644 (file)
@@ -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(_))
index c8af18c79c325d009c066f60a7976078f37d3048..d71d7d3689d560c6c537b571aef544cff7358854 100644 (file)
@@ -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) => {