mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2024-08-30 18:12:39 +00:00
chore: reload workspace when fail to load at the first time (#4633)
* chore: reload workspace when fail to load at the first time * fix: clippy * chore: update client api * chore: fix wasm build * chore: fix test
This commit is contained in:
@ -128,6 +128,7 @@ impl ServerProvider {
|
||||
config,
|
||||
*self.user_enable_sync.read(),
|
||||
self.config.device_id.clone(),
|
||||
&self.config.app_version,
|
||||
));
|
||||
|
||||
Ok::<Arc<dyn AppFlowyServer>, FlowyError>(server)
|
||||
|
@ -7,7 +7,7 @@ use tracing::event;
|
||||
use collab_integrate::collab_builder::AppFlowyCollabBuilder;
|
||||
use flowy_database2::DatabaseManager;
|
||||
use flowy_document::manager::DocumentManager;
|
||||
use flowy_error::FlowyResult;
|
||||
use flowy_error::{FlowyError, FlowyResult};
|
||||
use flowy_folder::manager::{FolderInitDataSource, FolderManager};
|
||||
use flowy_user::event_map::UserStatusCallback;
|
||||
use flowy_user_pub::cloud::{UserCloudConfig, UserCloudServiceProvider};
|
||||
@ -177,8 +177,13 @@ impl UserStatusCallback for UserStatusCallbackImpl {
|
||||
}
|
||||
},
|
||||
},
|
||||
Err(_) => FolderInitDataSource::LocalDisk {
|
||||
create_if_not_exist: true,
|
||||
Err(err) => match server_type {
|
||||
Server::Local => FolderInitDataSource::LocalDisk {
|
||||
create_if_not_exist: true,
|
||||
},
|
||||
Server::AppFlowyCloud | Server::Supabase => {
|
||||
return Err(FlowyError::from(err));
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
|
@ -185,7 +185,7 @@ impl AppFlowyCore {
|
||||
let cloned_user_manager = Arc::downgrade(&user_manager);
|
||||
if let Some(user_manager) = cloned_user_manager.upgrade() {
|
||||
if let Err(err) = user_manager
|
||||
.init(user_status_callback, collab_interact_impl)
|
||||
.init_with_callback(user_status_callback, collab_interact_impl)
|
||||
.await
|
||||
{
|
||||
error!("Init user failed: {}", err)
|
||||
|
Reference in New Issue
Block a user