feat, update, win, macos (#11618)

Signed-off-by: fufesou <linlong1266@gmail.com>
This commit is contained in:
fufesou
2025-05-04 07:32:47 +08:00
committed by GitHub
parent 62276b4f4f
commit ca00706a38
72 changed files with 2128 additions and 69 deletions

View File

@@ -2034,7 +2034,10 @@ pub mod sessions {
None => {}
}
}
SESSIONS.write().unwrap().remove(&remove_peer_key?)
let s = SESSIONS.write().unwrap().remove(&remove_peer_key?);
#[cfg(not(any(target_os = "android", target_os = "ios")))]
update_session_count_to_server();
s
}
fn check_remove_unused_displays(
@@ -2136,6 +2139,14 @@ pub mod sessions {
.write()
.unwrap()
.insert(session_id, Default::default());
#[cfg(not(any(target_os = "android", target_os = "ios")))]
update_session_count_to_server();
}
#[inline]
#[cfg(not(any(target_os = "android", target_os = "ios")))]
fn update_session_count_to_server() {
crate::ipc::update_controlling_session_count(SESSIONS.read().unwrap().len()).ok();
}
#[inline]