chore: Merge branch 'main' into develop

This commit is contained in:
nathan
2023-05-04 12:39:46 +08:00
146 changed files with 2576 additions and 1572 deletions

View File

@ -109,7 +109,7 @@ pub struct CalendarEventPB {
pub row_id: String,
#[pb(index = 2)]
pub title_field_id: String,
pub date_field_id: String,
#[pb(index = 3)]
pub title: String,

View File

@ -890,7 +890,7 @@ impl DatabaseViewData for DatabaseViewDataImpl {
fn get_row(&self, view_id: &str, row_id: &RowId) -> Fut<Option<(usize, Arc<Row>)>> {
let index = self.database.lock().index_of_row(view_id, row_id);
let row = self.database.lock().get_row(&row_id);
let row = self.database.lock().get_row(row_id);
to_fut(async move {
match (index, row) {
(Some(index), Some(row)) => Some((index, Arc::new(row))),

View File

@ -690,7 +690,7 @@ impl DatabaseViewEditor {
Some(CalendarEventPB {
row_id: row_id.into_inner(),
title_field_id: primary_field.id.clone(),
date_field_id: primary_field.id.clone(),
title,
timestamp,
})
@ -742,7 +742,7 @@ impl DatabaseViewEditor {
let event = CalendarEventPB {
row_id: row_id.into_inner(),
title_field_id,
date_field_id: title_field_id,
title,
timestamp,
};

View File

@ -93,7 +93,7 @@ pub(crate) async fn get_cell_for_row(
row_id: &RowId,
) -> Option<RowSingleCellData> {
let field = delegate.get_field(field_id).await?;
let cell = delegate.get_cell_in_row(field_id, &row_id).await?;
let cell = delegate.get_cell_in_row(field_id, row_id).await?;
let field_type = FieldType::from(field.field_type);
if let Some(handler) = delegate.get_type_option_cell_handler(&field, &field_type) {