mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2024-08-30 18:12:39 +00:00
chore: remove invalid revisions (#1816)
This commit is contained in:
@ -107,12 +107,12 @@ impl RevisionObjectDeserializer for FolderRevisionSerde {
|
||||
Ok(FolderPad::from_operations(operations)?)
|
||||
}
|
||||
|
||||
fn recover_operations_from_revisions(revisions: Vec<Revision>) -> Option<Self::Output> {
|
||||
if let Some(operations) = recover_operation_from_revisions(revisions, |operations| {
|
||||
fn recover_from_revisions(revisions: Vec<Revision>) -> Option<(Self::Output, i64)> {
|
||||
if let Some((operations, rev_id)) = recover_operation_from_revisions(revisions, |operations| {
|
||||
FolderPad::from_operations(operations.clone()).is_ok()
|
||||
}) {
|
||||
if let Ok(pad) = FolderPad::from_operations(operations) {
|
||||
return Some(pad);
|
||||
return Some((pad, rev_id));
|
||||
}
|
||||
}
|
||||
None
|
||||
|
Reference in New Issue
Block a user