mirror of
https://github.com/rustdesk/rustdesk.git
synced 2026-03-23 05:00:59 +03:00
refactor, will do with shared memory
This commit is contained in:
11
src/ui/cm.rs
11
src/ui/cm.rs
@@ -57,13 +57,6 @@ impl ConnectionManager {
|
||||
ICON.to_owned()
|
||||
}
|
||||
|
||||
fn check_click_time(&mut self, id: i32) {
|
||||
let lock = self.read().unwrap();
|
||||
if let Some(s) = lock.senders.get(&id) {
|
||||
allow_err!(s.send(Data::ClickTime(crate::get_time())));
|
||||
}
|
||||
}
|
||||
|
||||
#[inline]
|
||||
fn call(&self, func: &str, args: &[Value]) {
|
||||
let r = self.read().unwrap();
|
||||
@@ -118,9 +111,6 @@ impl ConnectionManager {
|
||||
Data::ChatMessage { text } => {
|
||||
self.call("newMessage", &make_args!(id, text));
|
||||
}
|
||||
Data::ClickTime(ms) => {
|
||||
self.call("resetClickCallback", &make_args!(ms as f64));
|
||||
}
|
||||
Data::FS(v) => match v {
|
||||
ipc::FS::ReadDir {
|
||||
dir,
|
||||
@@ -318,7 +308,6 @@ impl sciter::EventHandler for ConnectionManager {
|
||||
}
|
||||
|
||||
sciter::dispatch_script_call! {
|
||||
fn check_click_time(i32);
|
||||
fn get_icon();
|
||||
fn close(i32);
|
||||
fn authorize(i32);
|
||||
|
||||
Reference in New Issue
Block a user