Merge pull request #854 from AppFlowy-IO/feat/view_lens

This commit is contained in:
Nathan.fooo
2022-08-15 23:38:17 +08:00
committed by GitHub
38 changed files with 925 additions and 385 deletions

View File

@ -4,13 +4,12 @@ use flowy_error::{FlowyError, FlowyResult};
use flowy_revision::{
RevisionCloudService, RevisionCompactor, RevisionManager, RevisionObjectBuilder, RevisionWebSocket,
};
use flowy_sync::util::make_delta_from_revisions;
use flowy_sync::util::make_text_delta_from_revisions;
use flowy_sync::{
client_folder::{FolderChangeset, FolderPad},
entities::{revision::Revision, ws_data::ServerRevisionWSData},
};
use lib_infra::future::FutureResult;
use lib_ot::core::PhantomAttributes;
use parking_lot::RwLock;
use std::sync::Arc;
@ -132,7 +131,7 @@ impl FolderEditor {
pub struct FolderRevisionCompactor();
impl RevisionCompactor for FolderRevisionCompactor {
fn bytes_from_revisions(&self, revisions: Vec<Revision>) -> FlowyResult<Bytes> {
let delta = make_delta_from_revisions::<PhantomAttributes>(revisions)?;
let delta = make_text_delta_from_revisions(revisions)?;
Ok(delta.json_bytes())
}
}