Skip to content

Conversation

@BornToBeRoot
Copy link
Owner

Changes proposed in this pull request

  • Re-select the network interface after a network change or configuration update.

Related issue(s)

Copilot generated summary

Provide a Copilot generated summary of the changes in this pull request.

Copilot summary

This pull request includes several changes to the NetworkInterfaceViewModel class in the Source/NETworkManager/ViewModels/NetworkInterfaceViewModel.cs file. The main improvements are the transition from List to ObservableCollection for network interfaces, and the addition of checks to prevent multiple reloads of network interfaces.

Changes to data structures and initialization:

  • Changed _networkInterfaces from List<NetworkInterfaceInfo> to ObservableCollection<NetworkInterfaceInfo> to better support dynamic updates in the UI.
  • Updated the NetworkInterfaces property to use ObservableCollection<NetworkInterfaceInfo>.

Improvements to network interface loading:

  • Modified LoadNetworkInterfaces to add network interfaces directly to the ObservableCollection instead of replacing the entire collection.
  • Added a check in ReloadNetworkInterfaces to prevent multiple reloads if a reload is already in progress.
  • Enhanced ReloadNetworkInterfaces to clear and repopulate the ObservableCollection on the UI thread to ensure thread safety and UI consistency.

To-Do

Contributing

By submitting this pull request, I confirm the following:

@BornToBeRoot BornToBeRoot added this to the next-release milestone Feb 24, 2025
@mergify mergify bot merged commit a63fff1 into main Feb 24, 2025
4 checks passed
@mergify mergify bot deleted the fix/2657 branch February 24, 2025 00:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Network Interface - Reload after config change doesn't select last selected interface

2 participants