chore: bump collab (#4224)

* chore: bump collab

* chore: fix compile
This commit is contained in:
Nathan.fooo
2023-12-28 03:30:04 +08:00
committed by GitHub
parent ce58737ec5
commit f5db384fc2
10 changed files with 53 additions and 58 deletions

View File

@ -1,6 +1,6 @@
use collab::core::collab_state::SyncState;
use collab_database::rows::RowId;
use collab_database::user::DatabaseWithViews;
use collab_database::user::DatabaseViewTracker;
use collab_database::views::DatabaseLayout;
use flowy_derive::ProtoBuf;
@ -195,16 +195,12 @@ impl TryInto<MoveGroupRowParams> for MoveGroupRowPayloadPB {
#[derive(Debug, Default, ProtoBuf)]
pub struct DatabaseDescriptionPB {
#[pb(index = 1)]
pub name: String,
#[pb(index = 2)]
pub database_id: String,
}
impl From<DatabaseWithViews> for DatabaseDescriptionPB {
fn from(data: DatabaseWithViews) -> Self {
impl From<DatabaseViewTracker> for DatabaseDescriptionPB {
fn from(data: DatabaseViewTracker) -> Self {
Self {
name: data.name,
database_id: data.database_id,
}
}

View File

@ -1062,7 +1062,7 @@ impl DatabaseEditor {
&self,
changeset: DatabaseFieldChangesetPB,
) -> FlowyResult<()> {
let views = self.database.lock().get_all_views_description();
let views = self.database.lock().get_all_database_views_meta();
for view in views {
send_notification(&view.id, DatabaseNotification::DidUpdateFields)
.payload(changeset.clone())
@ -1618,7 +1618,7 @@ fn notify_did_update_database_field(
.ok_or(FlowyError::internal().with_context("fail to acquire the lock of database"))?;
let database_id = database.get_database_id();
let field = database.fields.get_field(field_id);
let views = database.get_all_views_description();
let views = database.get_all_database_views_meta();
(database_id, field, views)
};

View File

@ -129,7 +129,7 @@ fn database_from_fields_and_rows(
CreateDatabaseParams {
database_id,
view_id: view_id.to_string(),
name: "".to_string(),
view_name: "".to_string(),
layout: DatabaseLayout::Grid,
layout_settings: Default::default(),
filters: vec![],

View File

@ -34,7 +34,7 @@ pub fn make_default_grid(view_id: &str, name: &str) -> CreateDatabaseParams {
CreateDatabaseParams {
database_id: gen_database_id(),
view_id: view_id.to_string(),
name: name.to_string(),
view_name: name.to_string(),
layout: DatabaseLayout::Grid,
layout_settings: Default::default(),
filters: vec![],
@ -97,7 +97,7 @@ pub fn make_default_board(view_id: &str, name: &str) -> CreateDatabaseParams {
CreateDatabaseParams {
database_id: gen_database_id(),
view_id: view_id.to_string(),
name: name.to_string(),
view_name: name.to_string(),
layout: DatabaseLayout::Board,
layout_settings,
filters: vec![],
@ -143,7 +143,7 @@ pub fn make_default_calendar(view_id: &str, name: &str) -> CreateDatabaseParams
CreateDatabaseParams {
database_id: gen_database_id(),
view_id: view_id.to_string(),
name: name.to_string(),
view_name: name.to_string(),
layout: DatabaseLayout::Calendar,
layout_settings,
filters: vec![],