Fix/grid group (#1787)

* ci: config rust log

* chore: rename flowy-sdk to appflowy-core

* fix: create group after editing the url

* fix: start listen on new group

* chore: add tests

* refactor: mock data

* ci: update command
This commit is contained in:
Nathan.fooo
2023-02-02 23:02:49 +08:00
committed by GitHub
parent d09574951b
commit 069519589e
73 changed files with 1569 additions and 1900 deletions

View File

@ -1,10 +1,10 @@
use flowy_core::{get_client_server_configuration, FlowySDK, FlowySDKConfig};
use flowy_core::{get_client_server_configuration, AppFlowyCore, AppFlowyCoreConfig};
pub fn init_flowy_core() -> FlowySDK {
pub fn init_flowy_core() -> AppFlowyCore {
let data_path = tauri::api::path::data_dir().unwrap();
let path = format!("{}/AppFlowy", data_path.to_str().unwrap());
let server_config = get_client_server_configuration().unwrap();
let config = FlowySDKConfig::new(&path, "AppFlowy".to_string(), server_config)
let config = AppFlowyCoreConfig::new(&path, "AppFlowy".to_string(), server_config)
.log_filter("trace", vec!["appflowy_tauri".to_string()]);
FlowySDK::new(config)
AppFlowyCore::new(config)
}

View File

@ -1,4 +1,4 @@
use flowy_core::FlowySDK;
use flowy_core::AppFlowyCore;
use lib_dispatch::prelude::{
AFPluginDispatcher, AFPluginEventResponse, AFPluginRequest, StatusCode,
};
@ -39,7 +39,7 @@ pub async fn invoke_request(
app_handler: AppHandle<Wry>,
) -> AFTauriResponse {
let request: AFPluginRequest = request.into();
let state: State<FlowySDK> = app_handler.state();
let state: State<AppFlowyCore> = app_handler.state();
let dispatcher = state.inner().dispatcher();
let response = AFPluginDispatcher::async_send(dispatcher, request).await;
response.into()