Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: config polling comparison bug #338

Merged
merged 1 commit into from
Oct 16, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions src-tauri/src/commands.rs
Original file line number Diff line number Diff line change
Expand Up @@ -433,13 +433,23 @@ pub async fn locations_changed(
.await?
.into_iter()
.map(Location::<NoId>::from)
// ignore route_all_traffic flag as core does not have it
.map(|mut location| {
location.route_all_traffic = false;
location
})
.collect();
let db_locations: HashSet<Location<NoId>> = HashSet::from_iter(db_locations);
let core_locations: Vec<Location<NoId>> = device_config
.configs
.iter()
.map(|config| device_config_to_location(config.clone(), instance.id))
.map(Location::<NoId>::from)
// just to make sure we are really on the same page
.map(|mut location| {
location.route_all_traffic = false;
location
})
.collect();
let core_locations: HashSet<Location<NoId>> = HashSet::from_iter(core_locations);

Expand Down
Loading