Merge pull request #3335 from fufesou/fix/toggle_clipboard_option_dead_lock
fix toggle clipboard dead lock
This commit is contained in:
commit
1452a601b2
@ -1241,11 +1241,6 @@ impl LoginConfigHandler {
|
|||||||
if !name.contains("block-input") {
|
if !name.contains("block-input") {
|
||||||
self.save_config(config);
|
self.save_config(config);
|
||||||
}
|
}
|
||||||
#[cfg(feature = "flutter")]
|
|
||||||
#[cfg(not(any(target_os = "android", target_os = "ios")))]
|
|
||||||
if name == "disable-clipboard" {
|
|
||||||
crate::flutter::update_text_clipboard_required();
|
|
||||||
}
|
|
||||||
let mut misc = Misc::new();
|
let mut misc = Misc::new();
|
||||||
misc.set_option(option);
|
misc.set_option(option);
|
||||||
let mut msg_out = Message::new();
|
let mut msg_out = Message::new();
|
||||||
|
@ -165,9 +165,15 @@ pub fn session_reconnect(id: String, force_relay: bool) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
pub fn session_toggle_option(id: String, value: String) {
|
pub fn session_toggle_option(id: String, value: String) {
|
||||||
|
let mut is_found = false;
|
||||||
if let Some(session) = SESSIONS.write().unwrap().get_mut(&id) {
|
if let Some(session) = SESSIONS.write().unwrap().get_mut(&id) {
|
||||||
log::warn!("toggle option {}", value);
|
is_found = true;
|
||||||
session.toggle_option(value);
|
log::warn!("toggle option {}", &value);
|
||||||
|
session.toggle_option(value.clone());
|
||||||
|
}
|
||||||
|
#[cfg(not(any(target_os = "android", target_os = "ios")))]
|
||||||
|
if is_found && value == "disable-clipboard" {
|
||||||
|
crate::flutter::update_text_clipboard_required();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user