fix: compile
This commit is contained in:
parent
11c6008811
commit
a601e3b241
@ -1288,6 +1288,7 @@ pub fn main_start_ipc_url_server() {
|
||||
/// Send a url scheme throught the ipc.
|
||||
///
|
||||
/// * macOS only
|
||||
#[allow(unused_variables)]
|
||||
pub fn send_url_scheme(url: String) {
|
||||
#[cfg(target_os = "macos")]
|
||||
thread::spawn(move || crate::ui::macos::handle_url_scheme(url));
|
||||
|
@ -398,9 +398,7 @@ impl Connection {
|
||||
conn.send(msg).await;
|
||||
}
|
||||
ipc::Data::VoiceCallResponse(accepted) => {
|
||||
if accepted {
|
||||
conn.start_voice_call().await;
|
||||
}
|
||||
conn.handle_voice_call(accepted).await;
|
||||
}
|
||||
ipc::Data::CloseVoiceCall(_reason) => {
|
||||
conn.close_voice_call().await;
|
||||
@ -1613,10 +1611,11 @@ impl Connection {
|
||||
true
|
||||
}
|
||||
|
||||
pub async fn start_voice_call(&mut self) {
|
||||
pub async fn handle_voice_call(&mut self, accepted: bool) {
|
||||
if let Some(ts) = self.voice_call_request_timestamp.take() {
|
||||
let msg = new_voice_call_response(ts.get(), accepted);
|
||||
conn.send(msg).await;
|
||||
self.send(msg).await;
|
||||
if accepted {
|
||||
// Backup the default input device.
|
||||
let audio_input_device = Config::get_option("audio-input");
|
||||
self.audio_input_device_before_voice_call = Some(audio_input_device);
|
||||
@ -1625,6 +1624,7 @@ impl Connection {
|
||||
if let Some(device) = default_sound_device {
|
||||
set_sound_input(device);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
log::warn!("Possible a voice call attack.");
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user