Skip to content

Commit

Permalink
fix: fixed loading of country code
Browse files Browse the repository at this point in the history
Signed-off-by: MMaiero <[email protected]>
  • Loading branch information
MMaiero authored and salvatore-coppola committed Nov 20, 2024
1 parent 820c516 commit 0406832
Showing 1 changed file with 8 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -361,15 +361,11 @@ public TabWirelessUi(GwtSession currentSession, TabIp4Ui tcp4, TabIp6Ui tcp6,
setPasswordValidation();

this.tcp4Tab.status.addChangeHandler(event -> {
evalActiveConfig();

update();
evalActiveConfig();
});

this.tcp6Tab.status.addChangeHandler(event -> {
evalActiveConfig();

update();
evalActiveConfig();
});

logger.info("Constructor done.");
Expand All @@ -384,8 +380,8 @@ private void evalActiveConfig() {
|| !tcpIp6Status.equals(TabWirelessUi.this.tcp6Status);

if (isStatusChanged) {
if (tcpIp4Status.equals(MessageUtils.get(GwtNetIfStatus.netIPv4StatusEnabledWAN.name()))
|| tcpIp6Status.equals(MessageUtils.get(GwtNetIfStatus.netIPv4StatusEnabledWAN.name()))) {
if (tcpIp4Status.equals(GwtNetIfStatus.netIPv4StatusEnabledWAN.name())
|| tcpIp6Status.equals(GwtNetIfStatus.netIPv6StatusEnabledWAN.name())) {
TabWirelessUi.this.activeConfig = TabWirelessUi.this.selectedNetIfConfig.getStationWifiConfig();
} else {
TabWirelessUi.this.activeConfig = TabWirelessUi.this.selectedNetIfConfig.getActiveWifiConfig();
Expand All @@ -394,6 +390,8 @@ private void evalActiveConfig() {
TabWirelessUi.this.tcp4Status = tcpIp4Status;
TabWirelessUi.this.tcp6Status = tcpIp6Status;
TabWirelessUi.this.netTabs.updateTabs();

update();
}
}
}
Expand Down Expand Up @@ -458,12 +456,6 @@ public void setNetInterface(GwtNetInterfaceConfig config) {
this.selectedNetIfConfig = (GwtWifiNetInterfaceConfig) config;

this.activeConfig = this.selectedNetIfConfig.getActiveWifiConfig();

if (!(this.tcp4Status.equals(GwtNetIfStatus.netIPv4StatusDisabled.getValue())
&& this.tcp6Status.equals(GwtNetIfStatus.netIPv4StatusDisabled.getValue()))) {

loadCountryCode();
}
}
}

Expand Down Expand Up @@ -740,6 +732,8 @@ private void refreshForm() {
if (this.security.getSelectedItemText().equals(WIFI_SECURITY_WPA2_WPA3_ENTERPRISE_MESSAGE)) {
this.password.setEnabled(false);
}

loadCountryCode();
}

this.netTabs.updateTabs();
Expand Down

0 comments on commit 0406832

Please sign in to comment.