fix more bool options (#8809)

* fix more bool options
* hide sort ab tags because it's already sorted

Signed-off-by: 21pages <sunboeasy@gmail.com>
This commit is contained in:
21pages
2024-07-24 17:20:58 +08:00
committed by GitHub
parent 79a1f888d6
commit c04f460bbd
8 changed files with 29 additions and 23 deletions

View File

@@ -3,7 +3,10 @@ use hbb_common::password_security;
use hbb_common::{
allow_err,
bytes::Bytes,
config::{self, Config, LocalConfig, PeerConfig, CONNECT_TIMEOUT, RENDEZVOUS_PORT},
config::{
self, keys::*, option2bool, Config, LocalConfig, PeerConfig, CONNECT_TIMEOUT,
RENDEZVOUS_PORT,
},
directories_next,
futures::future::join_all,
log,
@@ -1156,9 +1159,9 @@ async fn check_connect_status_(reconnect: bool, rx: mpsc::UnboundedReceiver<ipc:
)
))]
{
let b = OPTIONS.lock().unwrap().get(config::keys::OPTION_ENABLE_FILE_TRANSFER).map(|x| x.to_string()).unwrap_or_default();
let b = OPTIONS.lock().unwrap().get(OPTION_ENABLE_FILE_TRANSFER).map(|x| x.to_string()).unwrap_or_default();
if b != enable_file_transfer {
clipboard::ContextSend::enable(b.is_empty());
clipboard::ContextSend::enable(option2bool(OPTION_ENABLE_FILE_TRANSFER, &b));
enable_file_transfer = b;
}
}