chore: rename struct

This commit is contained in:
appflowy
2022-03-10 17:14:10 +08:00
parent e45be3b81e
commit 7ac6a1dc89
72 changed files with 1788 additions and 785 deletions

View File

@ -14,8 +14,8 @@ use crate::{
};
use bytes::Bytes;
use flowy_collaboration::entities::{
document_info::BlockId,
revision::{RepeatedRevision, Revision},
text_block_info::TextBlockId,
};
use flowy_database::kv::KV;
use flowy_folder_data_model::entities::view::ViewDataType;
@ -147,7 +147,7 @@ impl ViewController {
}
#[tracing::instrument(level = "debug", skip(self,params), fields(doc_id = %params.value), err)]
pub(crate) async fn delete_view(&self, params: BlockId) -> Result<(), FlowyError> {
pub(crate) async fn delete_view(&self, params: TextBlockId) -> Result<(), FlowyError> {
if let Some(view_id) = KV::get_str(LATEST_VIEW_ID) {
if view_id == params.value {
let _ = KV::remove(LATEST_VIEW_ID);

View File

@ -1,4 +1,4 @@
use flowy_collaboration::entities::document_info::BlockInfo;
use flowy_collaboration::entities::text_block_info::TextBlockInfo;
use flowy_folder::event_map::FolderEvent::*;
use flowy_folder_data_model::entities::view::{RepeatedViewId, ViewId};
use flowy_folder_data_model::entities::workspace::WorkspaceId;
@ -161,14 +161,14 @@ pub async fn delete_view(sdk: &FlowySDKTest, view_ids: Vec<String>) {
.await;
}
pub async fn open_document(sdk: &FlowySDKTest, view_id: &str) -> BlockInfo {
pub async fn open_document(sdk: &FlowySDKTest, view_id: &str) -> TextBlockInfo {
let view_id: ViewId = view_id.into();
FolderEventBuilder::new(sdk.clone())
.event(SetLatestView)
.payload(view_id)
.async_send()
.await
.parse::<BlockInfo>()
.parse::<TextBlockInfo>()
}
pub async fn read_trash(sdk: &FlowySDKTest) -> RepeatedTrash {

View File

@ -1,5 +1,5 @@
use crate::helper::*;
use flowy_collaboration::entities::{document_info::BlockInfo, revision::RevisionState};
use flowy_collaboration::entities::{revision::RevisionState, text_block_info::TextBlockInfo};
use flowy_folder::{errors::ErrorCode, services::folder_editor::ClientFolderEditor};
use flowy_folder_data_model::entities::{
app::{App, RepeatedApp},
@ -58,7 +58,7 @@ pub struct FolderTest {
pub app: App,
pub view: View,
pub trash: Vec<Trash>,
pub document_info: Option<BlockInfo>,
pub document_info: Option<TextBlockInfo>,
// pub folder_editor:
}