Fix local filetree page tree open performance
This commit is contained in:
@@ -125,7 +125,9 @@ async fn project_projection(
|
||||
}
|
||||
})
|
||||
.await
|
||||
.map_err(|error| WebError::internal(format!("本地树 projection 构建任务失败: {error}")))??;
|
||||
.map_err(|error| {
|
||||
WebError::internal(format!("本地树 projection 构建任务失败: {error}"))
|
||||
})??;
|
||||
return Ok(ok_response(&context, snapshot.projection));
|
||||
}
|
||||
|
||||
@@ -409,7 +411,13 @@ mod tests {
|
||||
.as_array()
|
||||
.expect("items")
|
||||
.iter()
|
||||
.any(|item| item["title"] == "本地页面.md"));
|
||||
.any(|item| item["title"] == "本地页面"
|
||||
&& item["rowKind"] == "folder"
|
||||
&& item["documentId"]
|
||||
.as_str()
|
||||
.unwrap_or("")
|
||||
.starts_with("local-md:")
|
||||
&& item["resourceMeta"]["extra"]["source"]["relativePath"] == "本地页面"));
|
||||
|
||||
let _ = std::fs::remove_dir_all(&root);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user