From 8a04d93d66701c29a5e13d1ee1e4ee400d2cc681 Mon Sep 17 00:00:00 2001 From: BornToBeRoot <16019165+BornToBeRoot@users.noreply.github.com> Date: Wed, 21 Oct 2026 04:15:12 +0200 Subject: [PATCH 1/3] Fix: Auto refresh timers and status window close timer - Connections, Listeners, Neighbor Table, WiFi: don't restart the auto refresh timer after a refresh if auto refresh was disabled or the view was hidden in the meantime - WiFi: resume the auto refresh when the view becomes visible (was stopped instead) - Status window: cancel the close timer when the window is opened by the user Co-Authored-By: Claude Opus 5.5 --- Source/NETworkManager/StatusWindow.xaml.cs | 5 +++++ .../ViewModels/ConnectionsViewModel.cs | 10 ++++++++-- .../ViewModels/ListenersViewModel.cs | 10 ++++++++-- .../ViewModels/NeighborTableViewModel.cs | 9 ++++++++- Source/NETworkManager/ViewModels/WiFiViewModel.cs | 14 ++++++++++---- Website/docs/changelog/next-release.md | 6 ++++++ 6 files changed, 45 insertions(+), 9 deletions(-) diff --git a/Source/NETworkManager/StatusWindow.xaml.cs b/Source/NETworkManager/StatusWindow.xaml.cs index 2fdd16828a..8da7006ba6 100644 --- a/Source/NETworkManager/StatusWindow.xaml.cs +++ b/Source/NETworkManager/StatusWindow.xaml.cs @@ -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(); } diff --git a/Source/NETworkManager/ViewModels/ConnectionsViewModel.cs b/Source/NETworkManager/ViewModels/ConnectionsViewModel.cs index 2f303d7fe1..49bed2e95c 100644 --- a/Source/NETworkManager/ViewModels/ConnectionsViewModel.cs +++ b/Source/NETworkManager/ViewModels/ConnectionsViewModel.cs @@ -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 @@ -113,6 +114,7 @@ private async void AutoRefreshTimer_Tick(object sender, EventArgs e) /// The timer for auto-refresh. /// private readonly DispatcherTimer _autoRefreshTimer = new(); + private bool _isViewVisible = true; /// /// Gets or sets the search text. @@ -417,6 +419,8 @@ private async Task Refresh(bool init = false) /// public void OnViewVisible() { + _isViewVisible = true; + // Restart timer... if (AutoRefreshEnabled) _autoRefreshTimer.Start(); @@ -427,6 +431,8 @@ public void OnViewVisible() /// public void OnViewHide() { + _isViewVisible = false; + // Temporarily stop timer... if (AutoRefreshEnabled) _autoRefreshTimer.Stop(); diff --git a/Source/NETworkManager/ViewModels/ListenersViewModel.cs b/Source/NETworkManager/ViewModels/ListenersViewModel.cs index 5658ee8c52..257f495121 100644 --- a/Source/NETworkManager/ViewModels/ListenersViewModel.cs +++ b/Source/NETworkManager/ViewModels/ListenersViewModel.cs @@ -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 @@ -104,6 +105,7 @@ private async void AutoRefreshTimer_Tick(object sender, EventArgs e) /// The timer for auto-refresh. /// private readonly DispatcherTimer _autoRefreshTimer = new(); + private bool _isViewVisible = true; /// /// Gets or sets the search text. @@ -405,6 +407,8 @@ private async Task Refresh(bool init = false) /// public void OnViewVisible() { + _isViewVisible = true; + // Restart timer... if (AutoRefreshEnabled) _autoRefreshTimer.Start(); @@ -415,6 +419,8 @@ public void OnViewVisible() /// public void OnViewHide() { + _isViewVisible = false; + // Temporarily stop timer... if (AutoRefreshEnabled) _autoRefreshTimer.Stop(); diff --git a/Source/NETworkManager/ViewModels/NeighborTableViewModel.cs b/Source/NETworkManager/ViewModels/NeighborTableViewModel.cs index 905d09ae13..0f30bb1044 100644 --- a/Source/NETworkManager/ViewModels/NeighborTableViewModel.cs +++ b/Source/NETworkManager/ViewModels/NeighborTableViewModel.cs @@ -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 { @@ -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(); } @@ -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 diff --git a/Source/NETworkManager/ViewModels/WiFiViewModel.cs b/Source/NETworkManager/ViewModels/WiFiViewModel.cs index 43e2ed1c5b..67f6ff433e 100644 --- a/Source/NETworkManager/ViewModels/WiFiViewModel.cs +++ b/Source/NETworkManager/ViewModels/WiFiViewModel.cs @@ -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 @@ -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(); @@ -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) diff --git a/Website/docs/changelog/next-release.md b/Website/docs/changelog/next-release.md index 63124816d8..5b5849ff44 100644 --- a/Website/docs/changelog/next-release.md +++ b/Website/docs/changelog/next-release.md @@ -115,6 +115,11 @@ 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**, **Listeners**, **Neighbor Table** and **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. +- Fixed the auto refresh of **WiFi** not being resumed after switching back from another tool. + **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) @@ -124,6 +129,7 @@ Release date: **xx.xx.2026** - 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. **DNS Lookup** From 4f4ac9ce275765bec72afc2e99af837aff30d936 Mon Sep 17 00:00:00 2001 From: BornToBeRoot <16019165+BornToBeRoot@users.noreply.github.com> Date: Wed, 21 Oct 2026 04:18:33 +0200 Subject: [PATCH 2/3] Docs: Separate changelog entries per tool Co-Authored-By: Claude Opus 5.5 --- Website/docs/changelog/next-release.md | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/Website/docs/changelog/next-release.md b/Website/docs/changelog/next-release.md index 5b5849ff44..7b0c7389f2 100644 --- a/Website/docs/changelog/next-release.md +++ b/Website/docs/changelog/next-release.md @@ -115,14 +115,23 @@ 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**, **Listeners**, **Neighbor Table** and **WiFi** +**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. + +**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. -- Fixed the auto refresh of **WiFi** not being resumed after switching back from another tool. **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. + +**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. +- Fixed the auto refresh not being resumed after switching back from another tool. **Dashboard** From 024e2c79cdbb238b580ec6e83817b75fcd52585d Mon Sep 17 00:00:00 2001 From: BornToBeRoot <16019165+BornToBeRoot@users.noreply.github.com> Date: Wed, 21 Oct 2026 04:21:16 +0200 Subject: [PATCH 3/3] Docs: Add PR link to changelog Co-Authored-By: Claude Opus 5.5 --- Website/docs/changelog/next-release.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Website/docs/changelog/next-release.md b/Website/docs/changelog/next-release.md index 7b0c7389f2..81e2208ddb 100644 --- a/Website/docs/changelog/next-release.md +++ b/Website/docs/changelog/next-release.md @@ -117,28 +117,28 @@ Release date: **xx.xx.2026** **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. +- 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. +- 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. +- 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. -- Fixed the auto refresh not being resumed after switching back from another tool. +- 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. +- 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**