Skip to content

Bring projects, wikis, and teams together with AI. AppFlowy is the AI collaborative workspace where you achieve more without losing control of your data. The leading open source Notion alternative.

[rust]: Reset INIT_WORKSPACE flag for flutter's hot reload

appflowyfa683e48c06b
diff --git a/app_flowy/macos/Podfile.lock b/app_flowy/macos/Podfile.lock
index 7ccd266d3f..880eb85dd6 100644
--- a/app_flowy/macos/Podfile.lock
+++ b/app_flowy/macos/Podfile.lock
@@ -70,4 +70,4 @@ SPEC CHECKSUMS:
PODFILE CHECKSUM: 6eac6b3292e5142cfc23bdeb71848a40ec51c14c
-COCOAPODS: 1.11.2
+COCOAPODS: 1.10.1
diff --git a/rust-lib/flowy-document/src/services/doc/revision/persistence.rs b/rust-lib/flowy-document/src/services/doc/revision/persistence.rs
index 8363e2935e..4865f1681b 100644
--- a/rust-lib/flowy-document/src/services/doc/revision/persistence.rs
+++ b/rust-lib/flowy-document/src/services/doc/revision/persistence.rs
@@ -206,6 +206,7 @@ async fn fetch_from_local(doc_id: &str, persistence: Arc<Persistence>) -> DocRes
let data = op.get_data();
if !data.ends_with("\n") {
log::error!("The op must end with newline");
+ log::debug!("Invalid delta: {}", delta.to_json());
}
},
}
diff --git a/rust-lib/flowy-workspace/src/services/workspace_controller.rs b/rust-lib/flowy-workspace/src/services/workspace_controller.rs
index e5f711e90b..bfaa575a1d 100644
--- a/rust-lib/flowy-workspace/src/services/workspace_controller.rs
+++ b/rust-lib/flowy-workspace/src/services/workspace_controller.rs
@@ -39,6 +39,10 @@ impl WorkspaceController {
trash_can: Arc<TrashCan>,
server: Server,
) -> Self {
+ if let Ok(token) = user.token() {
+ INIT_WORKSPACE.write().insert(token, false);
+ }
+
let workspace_sql = Arc::new(WorkspaceTableSql {});
Self {
user,
@@ -52,11 +56,13 @@ impl WorkspaceController {
}
async fn init(&self, token: &str) -> Result<(), WorkspaceError> {
+ log::debug!("Start initializing workspace");
if let Some(is_init) = INIT_WORKSPACE.read().get(token) {
if *is_init {
return Ok(());
}
}
+ log::debug!("Finish initializing workspace");
INIT_WORKSPACE.write().insert(token.to_owned(), true);
let _ = self.server.init();
let _ = self.trash_can.init()?;