From: Olaf Wintermann Date: Sun, 2 Aug 2026 14:37:51 +0000 (+0200) Subject: fix fixed_title update in save_note X-Git-Url: https://uap-core.de/gitweb/?a=commitdiff_plain;h=ec2995a82d2c798cf290e5b0040b16fef3494d97;p=note.git fix fixed_title update in save_note --- diff --git a/application/backend/src/backend.rs b/application/backend/src/backend.rs index 823b2f0..cf00571 100644 --- a/application/backend/src/backend.rs +++ b/application/backend/src/backend.rs @@ -549,6 +549,9 @@ impl BackendHandle { if let Set(title) = note.title { update = update.col_expr(Column::Title, Expr::value(title)); } + if let Set(fixed_title) = note.fixed_title { + update = update.col_expr(Column::FixedTitle, Expr::value(fixed_title)); + } let uresult = update .col_expr(Column::Lastmodified, Expr::value(Utc::now())) @@ -691,10 +694,10 @@ impl BackendHandle { let mut update = Note::update_many(); if let Some(nodename ) = &nodename { - update = update.col_expr(Column::Nodename, Expr::value(nodename.clone())).col_expr(Column::FixedTitle, Expr::value(true)); + update = update.col_expr(Column::Nodename, Expr::value(nodename.clone())); } if let Some(title ) = &title { - update = update.col_expr(Column::Title, Expr::value(title)); + update = update.col_expr(Column::Title, Expr::value(title)).col_expr(Column::FixedTitle, Expr::value(true)); } let result = update diff --git a/application/note/src/note.rs b/application/note/src/note.rs index 07c3fbf..26a353b 100644 --- a/application/note/src/note.rs +++ b/application/note/src/note.rs @@ -387,7 +387,6 @@ impl Note { return; }; doc.ctx.set_state(AppStates::NoteTitleInput as i32); - self.fixed_title = true; } #[action] @@ -407,6 +406,7 @@ impl Note { let title = self.title.get(); self.notify_title_change(title.as_str()); self.modified = true; + self.fixed_title = true; } #[action] @@ -486,7 +486,6 @@ impl Note { eprintln!("rename_note: unexpected number of rows affected"); } else { note.nodename = Some(new_nodename); - note.fixed_title = true; } }, Err(e) => {