Skip to content

Commit e3cef76

Browse files
committed
Explain, why MaxLengthHistory handling is just fine.
Signed-off-by: Manuel Ullmann <manuel.ullmann@rediecon.com>
1 parent cc44d76 commit e3cef76

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Source/NETworkManager/ViewModels/FirewallSettingsViewModel.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@ private FirewallSettingsViewModel()
111111
_isLoading = true;
112112

113113
LoadSettings();
114+
114115
_isLoading = false;
115116
}
116117

@@ -124,6 +125,8 @@ private void LoadSettings()
124125
LocalPortsHaveItems = SettingsManager.Current.Firewall_LocalPortsHistoryConfig?.Count > 0;
125126
RemotePortsHaveItems = SettingsManager.Current.Firewall_RemotePortsHistoryConfig?.Count > 0;
126127
MaxLengthHistory = SettingsManager.Current.Firewall_MaxLengthHistory;
128+
// This default value is only present when the settings are initialized for the first time,
129+
// because Int32Validator does not allow 0 or negative values as input.
127130
if (MaxLengthHistory is 0)
128131
MaxLengthHistory = -1;
129132
}

0 commit comments

Comments
 (0)