mirror of
https://github.com/weyne85/rustdesk.git
synced 2025-10-29 17:00:05 +00:00
delete discovery from RustDesk_lan_peers.toml
Signed-off-by: 21pages <pages21@163.com>
This commit is contained in:
@@ -796,6 +796,10 @@ pub fn main_load_lan_peers() {
|
||||
};
|
||||
}
|
||||
|
||||
pub fn main_remove_discovered(id: String) {
|
||||
remove_discovered(id);
|
||||
}
|
||||
|
||||
fn main_broadcast_message(data: &HashMap<&str, &str>) {
|
||||
let apps = vec![
|
||||
flutter::APP_TYPE_DESKTOP_REMOTE,
|
||||
|
||||
@@ -413,9 +413,7 @@ impl UI {
|
||||
}
|
||||
|
||||
fn remove_discovered(&mut self, id: String) {
|
||||
let mut peers = config::LanPeers::load().peers;
|
||||
peers.retain(|x| x.id != id);
|
||||
config::LanPeers::store(&peers);
|
||||
remove_discovered(id);
|
||||
}
|
||||
|
||||
fn send_wol(&mut self, id: String) {
|
||||
|
||||
@@ -596,6 +596,13 @@ pub fn get_lan_peers() -> Vec<HashMap<&'static str, String>> {
|
||||
.collect()
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn remove_discovered(id: String) {
|
||||
let mut peers = config::LanPeers::load().peers;
|
||||
peers.retain(|x| x.id != id);
|
||||
config::LanPeers::store(&peers);
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn get_uuid() -> String {
|
||||
base64::encode(hbb_common::get_uuid())
|
||||
|
||||
Reference in New Issue
Block a user