Related Issue
linksys/LinksysWRT#399
Problem
In WiFi Advanced Settings page, the DFS confirmation dialog appears whenever the user saves any setting change, as long as DFS is already enabled. This is confusing when the user only changed IPTV or other settings.
Root Cause
wifi_advanced_settings_view.dart line 72 checks:
if (ref.read(wifiAdvancedProvider).isDFSEnabled == true) {
_showConfirmDFSModal()...
}
This checks the current state of DFS, not whether DFS was changed from off to on. So if DFS is already enabled, every save action shows the DFS confirmation dialog.
Expected Behavior
The DFS confirmation dialog should only appear when the user is turning DFS ON (changing from disabled to enabled), not when DFS is already enabled and the user is changing other settings.
Fix
Compare _preservedState (original state) with current state:
final isDFSBeingEnabled = _preservedState?.isDFSEnabled != true &&
currentState.isDFSEnabled == true;
if (isDFSBeingEnabled) {
_showConfirmDFSModal()...
}
Steps to Reproduce
- Go to WiFi Advanced Settings
- Have DFS already enabled (or enable it and save)
- Toggle IPTV on
- Click Save
- Actual: DFS confirmation dialog appears
- Expected: Save should proceed without DFS dialog (since DFS wasn't changed)
Related Issue
linksys/LinksysWRT#399
Problem
In WiFi Advanced Settings page, the DFS confirmation dialog appears whenever the user saves any setting change, as long as DFS is already enabled. This is confusing when the user only changed IPTV or other settings.
Root Cause
wifi_advanced_settings_view.dartline 72 checks:This checks the current state of DFS, not whether DFS was changed from off to on. So if DFS is already enabled, every save action shows the DFS confirmation dialog.
Expected Behavior
The DFS confirmation dialog should only appear when the user is turning DFS ON (changing from disabled to enabled), not when DFS is already enabled and the user is changing other settings.
Fix
Compare
_preservedState(original state) with current state:Steps to Reproduce