Richard Shiue ed052c6792
chore: include parent view id in initial chat settings (#7030)
* chore: include parent view id in initial chat settings

* chjore: add a tooltip
2024-12-22 14:46:54 +08:00

31 lines
946 B
Rust

use collab::entity::EncodedCollab;
use collab_entity::CollabType;
use collab_folder::ViewLayout;
use flowy_error::FlowyResult;
use lib_infra::async_trait::async_trait;
pub struct QueryCollab {
pub collab_type: CollabType,
pub encoded_collab: EncodedCollab,
}
pub trait FolderService: FolderQueryService + FolderViewEdit {}
#[async_trait]
pub trait FolderQueryService: Send + Sync + 'static {
/// gets the parent view and all of the ids of its children views matching
/// the provided view layout, given that the parent view is not a space
async fn get_surrounding_view_ids_with_view_layout(
&self,
parent_view_id: &str,
view_layout: ViewLayout,
) -> Vec<String>;
async fn get_collab(&self, object_id: &str, collab_type: CollabType) -> Option<QueryCollab>;
}
#[async_trait]
pub trait FolderViewEdit: Send + Sync + 'static {
async fn set_view_title_if_empty(&self, view_id: &str, title: &str) -> FlowyResult<()>;
}