Skip to content
Merged
Show file tree
Hide file tree
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
5 changes: 5 additions & 0 deletions Source/NETworkManager/StatusWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,11 @@ public void ShowWindow(bool enableCloseTimer = false)
return;
}

// Opened by the user, cancel a running close timer (e.g. if the window was opened on a network change)
_dispatcherTimerClose.Stop();
_stopwatch.Stop();
ShowTime = false;

// Focus the window
Activate();
}
Expand Down
10 changes: 8 additions & 2 deletions Source/NETworkManager/ViewModels/ConnectionsViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,9 @@ private async void AutoRefreshTimer_Tick(object sender, EventArgs e)
// Refresh
await Refresh();

// Restart timer...
_autoRefreshTimer.Start();
// Restart timer, unless auto refresh was disabled or the view was hidden in the meantime
if (AutoRefreshEnabled && _isViewVisible)
_autoRefreshTimer.Start();
}

#endregion
Expand All @@ -113,6 +114,7 @@ private async void AutoRefreshTimer_Tick(object sender, EventArgs e)
/// The timer for auto-refresh.
/// </summary>
private readonly DispatcherTimer _autoRefreshTimer = new();
private bool _isViewVisible = true;

/// <summary>
/// Gets or sets the search text.
Expand Down Expand Up @@ -417,6 +419,8 @@ private async Task Refresh(bool init = false)
/// </summary>
public void OnViewVisible()
{
_isViewVisible = true;

// Restart timer...
if (AutoRefreshEnabled)
_autoRefreshTimer.Start();
Expand All @@ -427,6 +431,8 @@ public void OnViewVisible()
/// </summary>
public void OnViewHide()
{
_isViewVisible = false;

// Temporarily stop timer...
if (AutoRefreshEnabled)
_autoRefreshTimer.Stop();
Expand Down
10 changes: 8 additions & 2 deletions Source/NETworkManager/ViewModels/ListenersViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,9 @@ private async void AutoRefreshTimer_Tick(object sender, EventArgs e)
// Refresh
await Refresh();

// Restart timer...
_autoRefreshTimer.Start();
// Restart timer, unless auto refresh was disabled or the view was hidden in the meantime
if (AutoRefreshEnabled && _isViewVisible)
_autoRefreshTimer.Start();
}

#endregion
Expand All @@ -104,6 +105,7 @@ private async void AutoRefreshTimer_Tick(object sender, EventArgs e)
/// The timer for auto-refresh.
/// </summary>
private readonly DispatcherTimer _autoRefreshTimer = new();
private bool _isViewVisible = true;

/// <summary>
/// Gets or sets the search text.
Expand Down Expand Up @@ -405,6 +407,8 @@ private async Task Refresh(bool init = false)
/// </summary>
public void OnViewVisible()
{
_isViewVisible = true;

// Restart timer...
if (AutoRefreshEnabled)
_autoRefreshTimer.Start();
Expand All @@ -415,6 +419,8 @@ public void OnViewVisible()
/// </summary>
public void OnViewHide()
{
_isViewVisible = false;

// Temporarily stop timer...
if (AutoRefreshEnabled)
_autoRefreshTimer.Stop();
Expand Down
9 changes: 8 additions & 1 deletion Source/NETworkManager/ViewModels/NeighborTableViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ private static string ResourceTranslate(NeighborState state)
private readonly bool _isLoading;

private readonly DispatcherTimer _autoRefreshTimer = new();
private bool _isViewVisible = true;

public string Search
{
Expand Down Expand Up @@ -471,12 +472,16 @@ private async Task Refresh(bool init = false)

public void OnViewVisible()
{
_isViewVisible = true;

if (AutoRefreshEnabled)
_autoRefreshTimer.Start();
}

public void OnViewHide()
{
_isViewVisible = false;

if (AutoRefreshEnabled)
_autoRefreshTimer.Stop();
}
Expand All @@ -494,7 +499,9 @@ private async void AutoRefreshTimer_Tick(object sender, EventArgs e)
if (!IsModifying)
await Refresh();

_autoRefreshTimer.Start();
// Restart timer, unless auto refresh was disabled or the view was hidden in the meantime
if (AutoRefreshEnabled && _isViewVisible)
_autoRefreshTimer.Start();
}

#endregion
Expand Down
14 changes: 10 additions & 4 deletions Source/NETworkManager/ViewModels/WiFiViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ public class WiFiViewModel : ViewModelBase

private readonly bool _isLoading;
private readonly DispatcherTimer _autoRefreshTimer = new();
private bool _isViewVisible = true;
private readonly DispatcherTimer _hideConnectionStatusMessageTimer = new();

public bool SdkContractAvailable
Expand Down Expand Up @@ -1296,13 +1297,17 @@ await DialogHelper.ShowMessageAsync(Application.Current.MainWindow, Strings.Erro

public void OnViewVisible()
{
// Temporarily stop timer...
_isViewVisible = true;

// Restart timer...
if (AutoRefreshEnabled)
_autoRefreshTimer.Stop();
_autoRefreshTimer.Start();
}

public void OnViewHide()
{
_isViewVisible = false;

// Temporarily stop timer...
if (AutoRefreshEnabled)
_autoRefreshTimer.Stop();
Expand All @@ -1324,8 +1329,9 @@ private async void AutoRefreshTimer_Tick(object sender, EventArgs e)
// Scan networks
await ScanAsync(SelectedAdapter, true);

// Restart timer...
_autoRefreshTimer.Start();
// Restart timer, unless auto refresh was disabled or the view was hidden in the meantime
if (AutoRefreshEnabled && _isViewVisible)
_autoRefreshTimer.Start();
}

private void HideConnectionStatusMessageTimer_Tick(object sender, EventArgs e)
Expand Down
15 changes: 15 additions & 0 deletions Website/docs/changelog/next-release.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,15 +115,30 @@ Release date: **xx.xx.2026**

- Fixed errors when changing the network configuration (e.g. missing permissions) not being shown — the change was reported as successful although it failed. The error message of Windows is now shown. [#3606](https://github.com/BornToBeRoot/NETworkManager/issues/3606)

**Connections**

- Fixed the auto refresh continuing in the background after switching to another tool, or after it was disabled, if this happened while a refresh was running. [#3639](https://github.com/BornToBeRoot/NETworkManager/pull/3639)

**Listeners**

- Fixed the auto refresh continuing in the background after switching to another tool, or after it was disabled, if this happened while a refresh was running. [#3639](https://github.com/BornToBeRoot/NETworkManager/pull/3639)

**Neighbor Table**

- Fixed adding and deleting entries not working until the application was restarted if loading the PowerShell module `NetTCPIP` failed once. [cc05937](https://github.com/BornToBeRoot/NETworkManager/commit/cc05937a7de2bf1247621845f47077f3796b9bb2)
- Fixed the auto refresh continuing in the background after switching to another tool, or after it was disabled, if this happened while a refresh was running. [#3639](https://github.com/BornToBeRoot/NETworkManager/pull/3639)

**WiFi**

- Fixed the auto refresh continuing in the background after switching to another tool, or after it was disabled, if this happened while a refresh was running. [#3639](https://github.com/BornToBeRoot/NETworkManager/pull/3639)
- Fixed the auto refresh not being resumed after switching back from another tool. [#3639](https://github.com/BornToBeRoot/NETworkManager/pull/3639)

**Dashboard**

- Fixed the **Network Connection** widget running a full connection check on every application startup, even if the Status Window or Dashboard was never opened. It now only checks when actually shown - via the tray icon, on a network change, or when the Dashboard tab is opened. [#3553](https://github.com/BornToBeRoot/NETworkManager/pull/3553)
- Fixed the DNS status (Computer/Router/Internet) in the **Network Connection** widget showing as an error when no PTR record exists for the address, which is common and expected for private IP ranges. This is now shown as informational instead of critical. [#3553](https://github.com/BornToBeRoot/NETworkManager/pull/3553)
- Fixed a race condition in the **Network Connection** widget where results from a superseded check could overwrite the results of a newer, still-running check after quickly reopening the widget. [#3553](https://github.com/BornToBeRoot/NETworkManager/pull/3553)
- Fixed the Status Window closing by itself after being opened from the tray icon (or with the hotkey), if it was opened automatically on a network change shortly before. [#3639](https://github.com/BornToBeRoot/NETworkManager/pull/3639)

**DNS Lookup**

Expand Down
Loading