mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2024-08-30 18:12:39 +00:00
chore: remove doc state check that download from remote
This commit is contained in:
parent
096a01ed44
commit
5a00361207
@ -208,23 +208,11 @@ impl AppFlowyCollabBuilder {
|
||||
#[allow(unused_variables)] persistence_config: CollabPersistenceConfig,
|
||||
build_config: CollabBuilderConfig,
|
||||
) -> Result<Arc<MutexCollab>, Error> {
|
||||
let is_from_doc_state = matches!(collab_doc_state, DocStateSource::FromDocState(_));
|
||||
let collab = CollabBuilder::new(uid, object_id)
|
||||
.with_doc_state(collab_doc_state)
|
||||
.with_device_id(self.device_id.clone())
|
||||
.build()?;
|
||||
|
||||
// If the object is from doc state, we need to validate the object type
|
||||
if is_from_doc_state {
|
||||
if let Err(err) = object_type.validate(&collab.lock()) {
|
||||
error!(
|
||||
"{:?} validation failed: {}, object_id: {}",
|
||||
object_type, err, object_id
|
||||
);
|
||||
return Err(err);
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(target_arch = "wasm32")]
|
||||
{
|
||||
collab.lock().add_plugin(Box::new(IndexeddbDiskPlugin::new(
|
||||
|
Loading…
Reference in New Issue
Block a user