mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2024-08-30 18:12:39 +00:00
fix: view name update (#2606)
* fix: update the view name * fix: pass invalid view id
This commit is contained in:
@ -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);
|
||||
|
@ -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);
|
||||
|
Reference in New Issue
Block a user