diff --git a/flutter/lib/common/widgets/login.dart b/flutter/lib/common/widgets/login.dart index bfc62825a..0fbd506f2 100644 --- a/flutter/lib/common/widgets/login.dart +++ b/flutter/lib/common/widgets/login.dart @@ -506,31 +506,15 @@ Future loginDialog() async { Text( translate('Login'), ).marginOnly(top: MyTheme.dialogPadding), - TextButton( - style: ButtonStyle( - overlayColor: MaterialStateProperty.resolveWith( - (Set states) { - if (states.contains(MaterialState.hovered)) { - return Colors.red; - } - return null; - }, - ), - padding: MaterialStateProperty.all( - EdgeInsets.all(5)), - minimumSize: MaterialStateProperty.all( - Size(0, 0), - ), - shape: MaterialStateProperty.all(RoundedRectangleBorder( - side: BorderSide.none, - borderRadius: BorderRadius.all(Radius.circular(5)))), - ), + InkWell( child: Icon( Icons.close, size: 22, color: Colors.black54, ), - onPressed: onDialogCancel, + onTap: onDialogCancel, + hoverColor: Colors.red, + borderRadius: BorderRadius.circular(5), ).marginOnly(top: 5, right: 5), ], ); diff --git a/libs/hbb_common/src/config.rs b/libs/hbb_common/src/config.rs index 785be96ee..39b40046e 100644 --- a/libs/hbb_common/src/config.rs +++ b/libs/hbb_common/src/config.rs @@ -310,7 +310,7 @@ pub struct TransferSerde { } #[inline] -pub fn get_online_statue() -> i64 { +pub fn get_online_state() -> i64 { *ONLINE.lock().unwrap().values().max().unwrap_or(&0) } diff --git a/src/flutter_ffi.rs b/src/flutter_ffi.rs index cc0a4f59a..e54168249 100644 --- a/src/flutter_ffi.rs +++ b/src/flutter_ffi.rs @@ -685,7 +685,7 @@ pub fn main_get_connect_status() -> String { } #[cfg(any(target_os = "android", target_os = "ios"))] { - let mut state = hbb_common::config::get_online_statue(); + let mut state = hbb_common::config::get_online_state(); if state > 0 { state = 1; } diff --git a/src/ipc.rs b/src/ipc.rs index 6a426e37d..526761c8b 100644 --- a/src/ipc.rs +++ b/src/ipc.rs @@ -347,7 +347,7 @@ async fn handle(data: Data, stream: &mut Connection) { } } Data::OnlineStatus(_) => { - let x = config::get_online_statue(); + let x = config::get_online_state(); let confirmed = Config::get_key_confirmed(); allow_err!(stream.send(&Data::OnlineStatus(Some((x, confirmed)))).await); }