mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2024-08-30 18:12:39 +00:00
chore: rename fns
This commit is contained in:
@ -215,7 +215,7 @@ impl DefaultFolderBuilder {
|
||||
for app in workspace_rev.apps.iter() {
|
||||
for (index, view) in app.belongings.iter().enumerate() {
|
||||
let view_data = if index == 0 {
|
||||
initial_read_me().to_json_str()
|
||||
initial_read_me().json_str()
|
||||
} else {
|
||||
initial_quill_delta_string()
|
||||
};
|
||||
|
@ -80,7 +80,7 @@ impl FolderEditor {
|
||||
pub(crate) fn apply_change(&self, change: FolderChange) -> FlowyResult<()> {
|
||||
let FolderChange { delta, md5 } = change;
|
||||
let (base_rev_id, rev_id) = self.rev_manager.next_rev_id_pair();
|
||||
let delta_data = delta.to_json_bytes();
|
||||
let delta_data = delta.json_bytes();
|
||||
let revision = Revision::new(
|
||||
&self.rev_manager.object_id,
|
||||
base_rev_id,
|
||||
@ -133,6 +133,6 @@ pub struct FolderRevisionCompactor();
|
||||
impl RevisionCompactor for FolderRevisionCompactor {
|
||||
fn bytes_from_revisions(&self, revisions: Vec<Revision>) -> FlowyResult<Bytes> {
|
||||
let delta = make_delta_from_revisions::<PhantomAttributes>(revisions)?;
|
||||
Ok(delta.to_json_bytes())
|
||||
Ok(delta.json_bytes())
|
||||
}
|
||||
}
|
||||
|
@ -110,7 +110,7 @@ impl FolderPersistence {
|
||||
pub async fn save_folder(&self, user_id: &str, folder_id: &FolderId, folder: FolderPad) -> FlowyResult<()> {
|
||||
let pool = self.database.db_pool()?;
|
||||
let json = folder.to_json()?;
|
||||
let delta_data = TextDeltaBuilder::new().insert(&json).build().to_json_bytes();
|
||||
let delta_data = TextDeltaBuilder::new().insert(&json).build().json_bytes();
|
||||
let revision = Revision::initial_revision(user_id, folder_id.as_ref(), delta_data);
|
||||
let record = RevisionRecord {
|
||||
revision,
|
||||
|
Reference in New Issue
Block a user