mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2024-08-30 18:12:39 +00:00
fix: appflowy session name
This commit is contained in:
parent
34cb2b2a09
commit
88e0f6a32c
@ -1,4 +1,4 @@
|
|||||||
use flowy_core::{get_client_server_configuration, AppFlowyCore, AppFlowyCoreConfig};
|
use flowy_core::{get_client_server_configuration, AppFlowyCore, AppFlowyCoreConfig, DEFAULT_NAME};
|
||||||
|
|
||||||
pub fn init_flowy_core() -> AppFlowyCore {
|
pub fn init_flowy_core() -> AppFlowyCore {
|
||||||
let config_json = include_str!("../tauri.conf.json");
|
let config_json = include_str!("../tauri.conf.json");
|
||||||
@ -14,7 +14,7 @@ pub fn init_flowy_core() -> AppFlowyCore {
|
|||||||
let server_config = get_client_server_configuration().unwrap();
|
let server_config = get_client_server_configuration().unwrap();
|
||||||
let config = AppFlowyCoreConfig::new(
|
let config = AppFlowyCoreConfig::new(
|
||||||
data_path.to_str().unwrap(),
|
data_path.to_str().unwrap(),
|
||||||
"AppFlowy".to_string(),
|
DEFAULT_NAME.to_string(),
|
||||||
server_config,
|
server_config,
|
||||||
)
|
)
|
||||||
.log_filter("trace", vec!["appflowy_tauri".to_string()]);
|
.log_filter("trace", vec!["appflowy_tauri".to_string()]);
|
||||||
|
@ -30,7 +30,7 @@ pub extern "C" fn init_sdk(path: *mut c_char) -> i64 {
|
|||||||
|
|
||||||
let server_config = get_client_server_configuration().unwrap();
|
let server_config = get_client_server_configuration().unwrap();
|
||||||
let log_crates = vec!["flowy-ffi".to_string()];
|
let log_crates = vec!["flowy-ffi".to_string()];
|
||||||
let config = AppFlowyCoreConfig::new(path, "appflowy".to_string(), server_config)
|
let config = AppFlowyCoreConfig::new(path, DEFAULT_NAME.to_string(), server_config)
|
||||||
.log_filter("info", log_crates);
|
.log_filter("info", log_crates);
|
||||||
*APPFLOWY_CORE.write() = Some(AppFlowyCore::new(config));
|
*APPFLOWY_CORE.write() = Some(AppFlowyCore::new(config));
|
||||||
|
|
||||||
|
@ -33,6 +33,10 @@ use user_model::UserProfile;
|
|||||||
|
|
||||||
static INIT_LOG: AtomicBool = AtomicBool::new(false);
|
static INIT_LOG: AtomicBool = AtomicBool::new(false);
|
||||||
|
|
||||||
|
/// This name will be used as to identify the current [AppFlowyCore] instance.
|
||||||
|
/// Don't change this.
|
||||||
|
pub const DEFAULT_NAME: &str = "appflowy";
|
||||||
|
|
||||||
#[derive(Clone)]
|
#[derive(Clone)]
|
||||||
pub struct AppFlowyCoreConfig {
|
pub struct AppFlowyCoreConfig {
|
||||||
/// Different `AppFlowyCoreConfig` instance should have different name
|
/// Different `AppFlowyCoreConfig` instance should have different name
|
||||||
|
Loading…
x
Reference in New Issue
Block a user