parent
bbe9017318
commit
d9b96d2f31
@ -913,20 +913,24 @@ pub fn main_set_local_option(key: String, value: String) {
|
|||||||
//
|
//
|
||||||
// 1. For get, the value is stored in the server process.
|
// 1. For get, the value is stored in the server process.
|
||||||
// 2. For clear, we need to need to return the error mmsg from the server process to flutter.
|
// 2. For clear, we need to need to return the error mmsg from the server process to flutter.
|
||||||
#[cfg(target_os = "linux")]
|
pub fn main_handle_wayland_screencast_restore_token(_key: String, _value: String) -> String {
|
||||||
pub fn main_handle_wayland_screencast_restore_token(key: String, value: String) -> String {
|
#[cfg(not(target_os = "linux"))]
|
||||||
if value == "get" {
|
{
|
||||||
match crate::ipc::get_wayland_screencast_restore_token(key) {
|
return "".to_owned();
|
||||||
|
}
|
||||||
|
#[cfg(target_os = "linux")]
|
||||||
|
if _value == "get" {
|
||||||
|
match crate::ipc::get_wayland_screencast_restore_token(_key) {
|
||||||
Ok(v) => v,
|
Ok(v) => v,
|
||||||
Err(e) => {
|
Err(e) => {
|
||||||
log::error!("Failed to get wayland screencast restore token, {}", e);
|
log::error!("Failed to get wayland screencast restore token, {}", e);
|
||||||
"".to_owned()
|
"".to_owned()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if value == "clear" {
|
} else if _value == "clear" {
|
||||||
match crate::ipc::clear_wayland_screencast_restore_token(key.clone()) {
|
match crate::ipc::clear_wayland_screencast_restore_token(_key.clone()) {
|
||||||
Ok(true) => {
|
Ok(true) => {
|
||||||
set_local_option(key, "".to_owned());
|
set_local_option(_key, "".to_owned());
|
||||||
"".to_owned()
|
"".to_owned()
|
||||||
}
|
}
|
||||||
Ok(false) => "Failed to clear, please try again.".to_owned(),
|
Ok(false) => "Failed to clear, please try again.".to_owned(),
|
||||||
@ -935,11 +939,7 @@ pub fn main_handle_wayland_screencast_restore_token(key: String, value: String)
|
|||||||
} else {
|
} else {
|
||||||
"".to_owned()
|
"".to_owned()
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
#[cfg(not(target_os = "linux"))]
|
|
||||||
pub fn main_handle_wayland_screencast_restore_token(_key: String, _value: String) -> String {
|
|
||||||
"".to_owned()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn main_get_input_source() -> SyncReturn<String> {
|
pub fn main_get_input_source() -> SyncReturn<String> {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user