fix: build ios (#8709)

Signed-off-by: fufesou <linlong1266@gmail.com>
This commit is contained in:
fufesou
2024-07-14 15:05:56 +08:00
committed by GitHub
parent 3a0ece1447
commit e2a7e38a39
3 changed files with 16 additions and 13 deletions

View File

@@ -1319,16 +1319,18 @@ pub fn cm_close_voice_call(id: i32) {
crate::ui_cm_interface::close_voice_call(id);
}
pub fn set_voice_call_input_device(is_cm: bool, device: String) {
if is_cm {
let _ = crate::ipc::set_config("voice-call-input", device);
pub fn set_voice_call_input_device(_is_cm: bool, _device: String) {
#[cfg(not(any(target_os = "android", target_os = "ios")))]
if _is_cm {
let _ = crate::ipc::set_config("voice-call-input", _device);
} else {
crate::audio_service::set_voice_call_input_device(Some(device), true);
crate::audio_service::set_voice_call_input_device(Some(_device), true);
}
}
pub fn get_voice_call_input_device(is_cm: bool) -> String {
if is_cm {
pub fn get_voice_call_input_device(_is_cm: bool) -> String {
#[cfg(not(any(target_os = "android", target_os = "ios")))]
if _is_cm {
match crate::ipc::get_config("voice-call-input") {
Ok(Some(device)) => device,
_ => "".to_owned(),
@@ -1336,6 +1338,8 @@ pub fn get_voice_call_input_device(is_cm: bool) -> String {
} else {
crate::audio_service::get_voice_call_input_device().unwrap_or_default()
}
#[cfg(any(target_os = "android", target_os = "ios"))]
"".to_owned()
}
pub fn main_get_last_remote_id() -> String {