From df14ecbfbde1eabf03cb52be564f71f7bc32a806 Mon Sep 17 00:00:00 2001 From: khorshuheng Date: Fri, 6 Sep 2024 11:02:53 +0800 Subject: [PATCH] fix: hide space without any published documents, allow private published collab --- src/biz/collab/publish_outline.rs | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/biz/collab/publish_outline.rs b/src/biz/collab/publish_outline.rs index eb9ba5bf..10b5b75f 100644 --- a/src/biz/collab/publish_outline.rs +++ b/src/biz/collab/publish_outline.rs @@ -4,16 +4,13 @@ use app_error::AppError; use collab_folder::Folder; use shared_entity::dto::workspace_dto::PublishedView; -use super::folder_view::{to_dto_view_icon, to_view_layout, view_is_space}; +use super::folder_view::{to_dto_view_icon, to_view_layout}; pub fn collab_folder_to_published_outline( folder: &Folder, publish_view_ids: &HashSet, ) -> Result { let mut unviewable = HashSet::new(); - for private_section in folder.get_all_private_sections() { - unviewable.insert(private_section.id); - } for trash_view in folder.get_all_trash_sections() { unviewable.insert(trash_view.id); } @@ -117,7 +114,7 @@ fn to_publish_view( }) .collect(); let is_published = publish_view_ids.contains(view_id); - if view_is_space(&view) || is_published || !pruned_view.is_empty() { + if is_published || !pruned_view.is_empty() { Some(PublishedView { view_id: view.id.clone(), name: view.name.clone(),