@@ -1385,14 +1385,21 @@ impl RemoteServerProjects {
|
|||||||
cx: &mut Context<Self>,
|
cx: &mut Context<Self>,
|
||||||
) {
|
) {
|
||||||
self.update_settings_file(cx, move |setting, _| {
|
self.update_settings_file(cx, move |setting, _| {
|
||||||
setting
|
let connections = setting.wsl_connections.get_or_insert(Default::default());
|
||||||
.wsl_connections
|
|
||||||
.get_or_insert(Default::default())
|
let distro_name = SharedString::from(connection_options.distro_name);
|
||||||
.push(settings::WslConnection {
|
let user = connection_options.user;
|
||||||
distro_name: SharedString::from(connection_options.distro_name),
|
|
||||||
user: connection_options.user,
|
if !connections
|
||||||
|
.iter()
|
||||||
|
.any(|conn| conn.distro_name == distro_name && conn.user == user)
|
||||||
|
{
|
||||||
|
connections.push(settings::WslConnection {
|
||||||
|
distro_name,
|
||||||
|
user,
|
||||||
projects: BTreeSet::new(),
|
projects: BTreeSet::new(),
|
||||||
})
|
})
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user