mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2024-08-30 18:12:39 +00:00
chore: rename some struct
This commit is contained in:
parent
15e1479caa
commit
32e20a4dc7
@ -6,6 +6,7 @@ use crate::services::block_manager::GridBlockManager;
|
||||
use crate::services::cell::{apply_cell_data_changeset, decode_any_cell_data, CellBytes};
|
||||
use crate::services::field::{default_type_option_builder_from_type, type_option_builder_from_bytes, FieldBuilder};
|
||||
use crate::services::filter::{GridFilterChangeset, GridFilterService};
|
||||
|
||||
use crate::services::group::GridGroupService;
|
||||
use crate::services::persistence::block_index::BlockIndexCache;
|
||||
use crate::services::row::{
|
||||
@ -31,8 +32,10 @@ pub struct GridRevisionEditor {
|
||||
pub(crate) grid_id: String,
|
||||
user: Arc<dyn GridUser>,
|
||||
grid_pad: Arc<RwLock<GridRevisionPad>>,
|
||||
// view_editor: Arc<GridViewRevisionEditor>,
|
||||
rev_manager: Arc<RevisionManager>,
|
||||
block_manager: Arc<GridBlockManager>,
|
||||
|
||||
#[allow(dead_code)]
|
||||
pub(crate) filter_service: Arc<GridFilterService>,
|
||||
|
||||
@ -59,6 +62,7 @@ impl GridRevisionEditor {
|
||||
let grid_pad = rev_manager.load::<GridPadBuilder>(Some(cloud)).await?;
|
||||
let rev_manager = Arc::new(rev_manager);
|
||||
let grid_pad = Arc::new(RwLock::new(grid_pad));
|
||||
|
||||
let block_meta_revs = grid_pad.read().await.get_block_meta_revs();
|
||||
let block_manager = Arc::new(GridBlockManager::new(grid_id, &user, block_meta_revs, persistence).await?);
|
||||
let filter_service =
|
||||
|
@ -1,5 +1,5 @@
|
||||
use flowy_error::{FlowyError, FlowyResult};
|
||||
use flowy_grid_data_model::revision::GridViewRevision;
|
||||
|
||||
use flowy_revision::{RevisionCloudService, RevisionManager, RevisionObjectBuilder};
|
||||
use flowy_sync::client_grid::GridViewRevisionPad;
|
||||
use flowy_sync::entities::revision::Revision;
|
||||
@ -7,12 +7,16 @@ use lib_infra::future::FutureResult;
|
||||
use std::sync::Arc;
|
||||
use tokio::sync::RwLock;
|
||||
|
||||
#[allow(dead_code)]
|
||||
pub struct GridViewRevisionEditor {
|
||||
#[allow(dead_code)]
|
||||
pad: Arc<RwLock<GridViewRevisionPad>>,
|
||||
#[allow(dead_code)]
|
||||
rev_manager: Arc<RevisionManager>,
|
||||
}
|
||||
|
||||
impl GridViewRevisionEditor {
|
||||
#[allow(dead_code)]
|
||||
pub async fn new(token: &str, mut rev_manager: RevisionManager) -> FlowyResult<Self> {
|
||||
let cloud = Arc::new(GridViewRevisionCloudService {
|
||||
token: token.to_owned(),
|
||||
|
@ -1,6 +1,5 @@
|
||||
use crate::cache::disk::RevisionDiskCache;
|
||||
use crate::disk::{RevisionChangeset, RevisionRecord, RevisionState};
|
||||
|
||||
use bytes::Bytes;
|
||||
use diesel::{sql_types::Integer, update, SqliteConnection};
|
||||
use flowy_database::{
|
@ -1 +0,0 @@
|
||||
|
@ -1,12 +1,10 @@
|
||||
mod folder_rev_impl;
|
||||
mod grid_block_meta_rev_impl;
|
||||
mod grid_rev_impl;
|
||||
mod text_rev_impl;
|
||||
mod document_impl;
|
||||
mod grid_block_impl;
|
||||
mod grid_impl;
|
||||
|
||||
pub use folder_rev_impl::*;
|
||||
pub use grid_block_meta_rev_impl::*;
|
||||
pub use grid_rev_impl::*;
|
||||
pub use text_rev_impl::*;
|
||||
pub use document_impl::*;
|
||||
pub use grid_block_impl::*;
|
||||
pub use grid_impl::*;
|
||||
|
||||
use flowy_error::FlowyResult;
|
||||
use flowy_sync::entities::revision::{RevId, Revision, RevisionRange};
|
||||
|
@ -22,10 +22,12 @@ pub struct GridViewRevision {
|
||||
|
||||
impl GridViewRevision {
|
||||
pub fn new(grid_id: String) -> Self {
|
||||
let mut view_rev = GridViewRevision::default();
|
||||
view_rev.grid_id = grid_id;
|
||||
view_rev.view_id = gen_grid_view_id();
|
||||
view_rev
|
||||
GridViewRevision {
|
||||
view_id: gen_grid_view_id(),
|
||||
grid_id,
|
||||
setting: Default::default(),
|
||||
row_orders: vec![],
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
use crate::entities::revision::{md5, RepeatedRevision, Revision};
|
||||
use crate::errors::{CollaborateError, CollaborateResult};
|
||||
use crate::util::{cal_diff, make_delta_from_revisions, make_text_delta_from_revisions};
|
||||
use crate::util::{cal_diff, make_text_delta_from_revisions};
|
||||
use flowy_grid_data_model::revision::{
|
||||
gen_block_id, gen_row_id, CellRevision, GridBlockRevision, RowMetaChangeset, RowRevision,
|
||||
};
|
||||
|
@ -1,6 +1,6 @@
|
||||
use crate::entities::revision::{md5, Revision};
|
||||
use crate::errors::{internal_error, CollaborateError, CollaborateResult};
|
||||
use crate::util::{cal_diff, make_delta_from_revisions, make_text_delta_from_revisions};
|
||||
use crate::util::{cal_diff, make_text_delta_from_revisions};
|
||||
use flowy_grid_data_model::revision::{
|
||||
FieldRevision, FieldTypeRevision, FilterConfigurationRevision, FilterConfigurationsByFieldId, GridViewRevision,
|
||||
GroupConfigurationRevision, GroupConfigurationsByFieldId, SortConfigurationsByFieldId,
|
||||
|
Loading…
Reference in New Issue
Block a user