fix: hide map mode if peer is android

This commit is contained in:
mcfans 2023-10-27 16:43:50 +08:00
parent e77edc56fd
commit 9076f213e6

View File

@ -216,6 +216,11 @@ impl<T: InvokeUiSession> Session<T> {
pub fn get_keyboard_mode(&self) -> String {
let mode = self.lc.read().unwrap().keyboard_mode.clone();
if self.peer_platform() == crate::PLATFORM_ANDROID {
if mode == "map" {
return "translate".to_string();
}
}
if ["map", "translate", "legacy"].contains(&(&mode as &str)) {
mode
} else {