mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2025-04-25 07:07:32 -04:00
[flutter]: adjust ui
This commit is contained in:
parent
820fb1f61f
commit
05f9f7b4a1
5 changed files with 5 additions and 16 deletions
|
@ -33,7 +33,7 @@ class ApplicationWidget extends StatelessWidget {
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
const ratio = 1.73;
|
const ratio = 1.73;
|
||||||
const minWidth = 1000.0;
|
const minWidth = 1200.0;
|
||||||
setWindowMinSize(const Size(minWidth, minWidth / ratio));
|
setWindowMinSize(const Size(minWidth, minWidth / ratio));
|
||||||
// const launchWidth = 1310.0;
|
// const launchWidth = 1310.0;
|
||||||
// setWindowFrame(const Rect.fromLTWH(0, 0, launchWidth, launchWidth / ratio));
|
// setWindowFrame(const Rect.fromLTWH(0, 0, launchWidth, launchWidth / ratio));
|
||||||
|
|
|
@ -102,18 +102,6 @@ class _SkipLogInScreenState extends State<SkipLogInScreen> {
|
||||||
WorkspaceEventReadCurWorkspace().send().then((result) {
|
WorkspaceEventReadCurWorkspace().send().then((result) {
|
||||||
_openCurrentWorkspace(context, user, result);
|
_openCurrentWorkspace(context, user, result);
|
||||||
});
|
});
|
||||||
userListener = getIt<IUserListener>(param1: user);
|
|
||||||
userListener!.workspaceUpdatedNotifier.addPublishListener((result) {
|
|
||||||
result.fold(
|
|
||||||
(workspace) {
|
|
||||||
assert(workspace.length == 1);
|
|
||||||
if (workspace.isNotEmpty) {
|
|
||||||
_openCurrentWorkspace(context, user, dartz.left(workspace[0]));
|
|
||||||
}
|
|
||||||
},
|
|
||||||
(error) => _openCurrentWorkspace(context, user, dartz.right(error)),
|
|
||||||
);
|
|
||||||
});
|
|
||||||
},
|
},
|
||||||
(error) {
|
(error) {
|
||||||
Log.error(error);
|
Log.error(error);
|
||||||
|
|
|
@ -58,9 +58,8 @@ class SplashScreen extends StatelessWidget {
|
||||||
}
|
}
|
||||||
|
|
||||||
void _handleUnauthenticated(BuildContext context, Unauthenticated result) {
|
void _handleUnauthenticated(BuildContext context, Unauthenticated result) {
|
||||||
Log.error(result.error);
|
// Log.error(result.error);
|
||||||
// getIt<ISplashRoute>().pushSignInScreen(context);
|
// getIt<ISplashRoute>().pushSignInScreen(context);
|
||||||
|
|
||||||
getIt<ISplashRoute>().pushSkipLoginScreen(context);
|
getIt<ISplashRoute>().pushSkipLoginScreen(context);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,7 +25,7 @@ pub extern "C" fn init_sdk(path: *mut c_char) -> i64 {
|
||||||
let path: &str = c_str.to_str().unwrap();
|
let path: &str = c_str.to_str().unwrap();
|
||||||
|
|
||||||
let server_config = ServerConfig::default();
|
let server_config = ServerConfig::default();
|
||||||
let config = FlowySDKConfig::new(path, server_config, "AppFlowy").log_filter("debug");
|
let config = FlowySDKConfig::new(path, server_config, "appflowy").log_filter("debug");
|
||||||
*FLOWY_SDK.write() = Some(Arc::new(FlowySDK::new(config)));
|
*FLOWY_SDK.write() = Some(Arc::new(FlowySDK::new(config)));
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
|
|
|
@ -25,6 +25,7 @@ impl KV {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn set(value: KeyValue) -> Result<(), String> {
|
fn set(value: KeyValue) -> Result<(), String> {
|
||||||
|
log::debug!("set value: {:?}", value);
|
||||||
update_cache(value.clone());
|
update_cache(value.clone());
|
||||||
|
|
||||||
let _ = diesel::replace_into(kv_table::table)
|
let _ = diesel::replace_into(kv_table::table)
|
||||||
|
@ -53,6 +54,7 @@ impl KV {
|
||||||
|
|
||||||
#[allow(dead_code)]
|
#[allow(dead_code)]
|
||||||
pub fn remove(key: &str) -> Result<(), String> {
|
pub fn remove(key: &str) -> Result<(), String> {
|
||||||
|
log::debug!("remove key: {}", key);
|
||||||
match KV_HOLDER.write() {
|
match KV_HOLDER.write() {
|
||||||
Ok(mut guard) => {
|
Ok(mut guard) => {
|
||||||
guard.cache.remove(key);
|
guard.cache.remove(key);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue