mirror of
https://github.com/rustdesk/hbb_common.git
synced 2026-02-16 02:20:43 +00:00
@@ -1024,6 +1024,10 @@ impl Config {
|
||||
|
||||
pub fn set_option(k: String, v: String) {
|
||||
if !is_option_can_save(&OVERWRITE_SETTINGS, &k, &DEFAULT_SETTINGS, &v) {
|
||||
let mut config = CONFIG2.write().unwrap();
|
||||
if config.options.remove(&k).is_some() {
|
||||
config.store();
|
||||
}
|
||||
return;
|
||||
}
|
||||
let mut config = CONFIG2.write().unwrap();
|
||||
@@ -1800,6 +1804,10 @@ impl LocalConfig {
|
||||
|
||||
pub fn set_option(k: String, v: String) {
|
||||
if !is_option_can_save(&OVERWRITE_LOCAL_SETTINGS, &k, &DEFAULT_LOCAL_SETTINGS, &v) {
|
||||
let mut config = LOCAL_CONFIG.write().unwrap();
|
||||
if config.options.remove(&k).is_some() {
|
||||
config.store();
|
||||
}
|
||||
return;
|
||||
}
|
||||
let mut config = LOCAL_CONFIG.write().unwrap();
|
||||
@@ -1960,6 +1968,9 @@ impl UserDefaultConfig {
|
||||
&DEFAULT_DISPLAY_SETTINGS,
|
||||
&value,
|
||||
) {
|
||||
if self.options.remove(&key).is_some() {
|
||||
self.store();
|
||||
}
|
||||
return;
|
||||
}
|
||||
if value.is_empty() {
|
||||
|
||||
Reference in New Issue
Block a user