refactor: remove singleton db (#4208)

* refactor: remove singleton db

* chore: fix warning

* chore: fix warning

* chore: update test

* chore: only resotre or backup when init call

* test: fix

* test: fix

* test: fix

* fix: timeout notification

* chore: rename

* chore: rename

* chore: disable test

* chore: remove log

* chore: remove log

* chore: add log

* chore: rename test functions

* chore: add test asset

* chore: bump client api

* chore: disable some tests
This commit is contained in:
Nathan.fooo
2023-12-27 11:42:39 +08:00
committed by GitHub
parent 121ed5a06e
commit df8409178b
110 changed files with 947 additions and 829 deletions

View File

@ -16,7 +16,7 @@ use lru::LruCache;
use tokio::sync::{Mutex, RwLock};
use tracing::{event, instrument, trace};
use collab_integrate::collab_builder::AppFlowyCollabBuilder;
use collab_integrate::collab_builder::{AppFlowyCollabBuilder, CollabBuilderConfig};
use collab_integrate::{CollabPersistenceConfig, RocksCollabDB};
use flowy_database_deps::cloud::DatabaseCloudService;
use flowy_error::{internal_error, FlowyError, FlowyResult};
@ -457,6 +457,7 @@ impl DatabaseCollabService for UserDatabaseCollabServiceImpl {
collab_db,
collab_raw_data,
config,
CollabBuilderConfig::default().sync_enable(true),
))
.unwrap()
}

View File

@ -496,8 +496,10 @@ fn merge_groups(
merge_result.new_groups.extend(new_group_map.into_values());
// The `No status` group index is initialized to 0
if !no_status_group_inserted && no_status_group.is_some() {
merge_result.all_groups.insert(0, no_status_group.unwrap());
if !no_status_group_inserted {
if let Some(group) = no_status_group {
merge_result.all_groups.insert(0, group);
}
}
merge_result
}