fix: view name update (#2606)

* fix: update the view name

* fix: pass invalid view id
This commit is contained in:
Nathan.fooo
2023-05-24 08:57:58 +08:00
committed by GitHub
parent 056e2d49d0
commit 65cc2040e5
10 changed files with 48 additions and 54 deletions

View File

@ -285,7 +285,7 @@ impl DatabaseEditor {
database.index_of_row(view_id, &from),
database.index_of_row(view_id, &to),
) {
database.views.update_view(view_id, |view| {
database.views.update_database_view(view_id, |view| {
view.move_row_order(from_index as u32, to_index as u32);
});
drop(database);
@ -381,7 +381,7 @@ impl DatabaseEditor {
) -> FlowyResult<()> {
let (database_id, field) = {
let database = self.database.lock();
database.views.update_view(view_id, |view_update| {
database.views.update_database_view(view_id, |view_update| {
view_update.move_field_order(from as u32, to as u32);
});
let field = database.fields.get_field(field_id);

View File

@ -385,9 +385,9 @@ where
if is_changed {
let configuration = (*self.setting).clone();
let writer = self.writer.clone();
let field_id = self.field.id.clone();
let view_id = self.view_id.clone();
tokio::spawn(async move {
match writer.save_configuration(&field_id, configuration).await {
match writer.save_configuration(&view_id, configuration).await {
Ok(_) => {},
Err(e) => {
tracing::error!("Save group configuration failed: {}", e);