Skip to content

Commit 84434ef

Browse files
CopilotBornToBeRoot
andcommitted
Use direct pattern for policy check and remove helper property
Co-authored-by: BornToBeRoot <16019165+BornToBeRoot@users.noreply.github.com>
1 parent 388c828 commit 84434ef

File tree

2 files changed

+2
-20
lines changed

2 files changed

+2
-20
lines changed

Source/NETworkManager.Settings/SettingsManager.cs

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -56,25 +56,6 @@ public static class SettingsManager
5656
/// </summary>
5757
public static bool HotKeysChanged { get; set; }
5858

59-
/// <summary>
60-
/// Gets whether update check should be performed at startup.
61-
/// This respects the system-wide policies (config.json) which take precedence over user settings.
62-
/// </summary>
63-
public static bool ShouldCheckForUpdatesAtStartup
64-
{
65-
get
66-
{
67-
// System-wide policy takes precedence - if set, use the policy value
68-
if (PolicyManager.Current?.Update_CheckForUpdatesAtStartup.HasValue == true)
69-
{
70-
return PolicyManager.Current.Update_CheckForUpdatesAtStartup.Value;
71-
}
72-
73-
// Otherwise, use the user's setting
74-
return Current.Update_CheckForUpdatesAtStartup;
75-
}
76-
}
77-
7859
/// <summary>
7960
/// JSON serializer options for consistent serialization/deserialization.
8061
/// </summary>

Source/NETworkManager/MainWindow.xaml.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -561,7 +561,8 @@ private void Load()
561561
NetworkChange.NetworkAddressChanged += (_, _) => OnNetworkHasChanged();
562562

563563
// Search for updates...
564-
if (SettingsManager.ShouldCheckForUpdatesAtStartup)
564+
if (PolicyManager.Current?.Update_CheckForUpdatesAtStartup
565+
?? SettingsManager.Current.Update_CheckForUpdatesAtStartup)
565566
CheckForUpdates();
566567
}
567568

0 commit comments

Comments
 (0)