revert back from lan discovery merge

This commit is contained in:
open-trade
2022-01-10 18:05:42 +08:00
parent b400e4305f
commit 9a92b6ac4a
19 changed files with 26 additions and 701 deletions

View File

@@ -91,7 +91,6 @@ pub enum Data {
RawMessage(Vec<u8>),
Socks(Option<config::Socks5Server>),
FS(FS),
SessionsUpdated,
Test,
}
@@ -407,22 +406,6 @@ pub fn get_id() -> String {
}
}
pub async fn get_id_async() -> String {
if let Ok(Some(v)) = get_config_async("id", 1_000).await {
// update salt also, so that next time reinstallation not causing first-time auto-login failure
if let Ok(Some(v2)) = get_config_async("salt", 1_000).await {
Config::set_salt(&v2);
}
if v != Config::get_id() {
Config::set_key_confirmed(false);
Config::set_id(&v);
}
v
} else {
Config::get_id()
}
}
pub fn get_password() -> String {
if let Ok(Some(v)) = get_config("password") {
Config::set_password(&v);