feat: mobile map mode (#9717)

Signed-off-by: fufesou <linlong1266@gmail.com>
This commit is contained in:
fufesou
2024-10-23 09:28:39 +08:00
committed by GitHub
parent 2cdaca0fa3
commit cc6f919080
5 changed files with 64 additions and 44 deletions

View File

@@ -222,6 +222,10 @@ pub fn session_get_enable_trusted_devices(session_id: SessionID) -> SyncReturn<b
pub fn session_close(session_id: SessionID) {
if let Some(session) = sessions::remove_session_by_session_id(&session_id) {
// `release_remote_keys` is not required for mobile platforms in common cases.
// But we still call it to make the code more stable.
#[cfg(any(target_os = "android", target_os = "ios"))]
crate::keyboard::release_remote_keys("map");
session.close_event_stream(session_id);
session.close();
}