mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2025-04-24 22:57:12 -04:00
feat: move handles to flowy-block crate
This commit is contained in:
parent
11ceb96f65
commit
5c155a07bf
48 changed files with 370 additions and 101 deletions
|
@ -23,8 +23,6 @@ use crate::{
|
|||
};
|
||||
use flowy_block::BlockManager;
|
||||
use flowy_database::kv::KV;
|
||||
use flowy_folder_data_model::entities::share::{ExportData, ExportParams};
|
||||
|
||||
use lib_infra::uuid;
|
||||
|
||||
const LATEST_VIEW_ID: &str = "latest_view_id";
|
||||
|
@ -179,16 +177,6 @@ impl ViewController {
|
|||
Ok(())
|
||||
}
|
||||
|
||||
#[tracing::instrument(level = "debug", skip(self, params), err)]
|
||||
pub(crate) async fn export_view(&self, params: ExportParams) -> Result<ExportData, FlowyError> {
|
||||
let editor = self.block_manager.open_block(¶ms.view_id).await?;
|
||||
let delta_json = editor.block_json().await?;
|
||||
Ok(ExportData {
|
||||
data: delta_json,
|
||||
export_type: params.export_type,
|
||||
})
|
||||
}
|
||||
|
||||
// belong_to_id will be the app_id or view_id.
|
||||
#[tracing::instrument(level = "debug", skip(self), err)]
|
||||
pub(crate) async fn read_views_belong_to(&self, belong_to_id: &str) -> Result<RepeatedView, FlowyError> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue