Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: fixed loading of country code #5572

Merged
merged 2 commits into from
Nov 21, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -628,7 +620,7 @@ private void refreshForm() {

// Tcp/IP disabled
if (tcpip4Status.equals(GwtNetIfStatus.netIPv4StatusDisabled.getValue())
&& tcpip6Status.equals(GwtNetIfStatus.netIPv4StatusDisabled.getValue())) {
&& tcpip6Status.equals(GwtNetIfStatus.netIPv6StatusDisabled.getValue())) {
setForm(false);
} else {
setForm(true);
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
Loading