sync theme

Signed-off-by: 21pages <pages21@163.com>
This commit is contained in:
21pages
2022-09-07 18:57:49 +08:00
parent 17a7cbf7bb
commit b4e0101e3e
10 changed files with 84 additions and 18 deletions

View File

@@ -373,7 +373,8 @@ pub fn get_mouse_time() -> f64 {
}
pub fn check_mouse_time() {
#[cfg(not(any(target_os = "android", target_os = "ios")))]{
#[cfg(not(any(target_os = "android", target_os = "ios")))]
{
let sender = SENDER.lock().unwrap();
allow_err!(sender.send(ipc::Data::MouseMoveTime(0)));
}
@@ -779,6 +780,13 @@ pub(crate) async fn check_connect_status_(reconnect: bool, rx: mpsc::UnboundedRe
}
}
#[tokio::main(flavor = "current_thread")]
pub(crate) async fn send_to_cm(data: &ipc::Data) {
if let Ok(mut c) = ipc::connect(1000, "_cm").await {
c.send(data).await.ok();
}
}
const INVALID_FORMAT: &'static str = "Invalid format";
const UNKNOWN_ERROR: &'static str = "Unknown error";