mirror of
https://github.com/GiriNeko/hbb_common.git
synced 2025-12-16 21:37:27 +00:00
Update config.rs
This commit is contained in:
parent
0e279c1a8f
commit
fa160b2864
1 changed files with 7 additions and 0 deletions
|
|
@ -951,6 +951,13 @@ impl Config {
|
||||||
config.key_pair
|
config.key_pair
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn no_register_device() -> bool {
|
||||||
|
BUILTIN_SETTINGS.read().unwrap()
|
||||||
|
.get(keys::OPTION_REGISTER_DEVICE)
|
||||||
|
.map(|v| v == "N")
|
||||||
|
.unwrap_or(false)
|
||||||
|
}
|
||||||
|
|
||||||
pub fn get_id() -> String {
|
pub fn get_id() -> String {
|
||||||
let mut id = CONFIG.read().unwrap().id.clone();
|
let mut id = CONFIG.read().unwrap().id.clone();
|
||||||
if id.is_empty() {
|
if id.is_empty() {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue