mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-06-28 01:52:06 +08:00
ui/networking: call isTetheringEnabled out of the loop (#29028)
old-commit-hash: 4584e883dcf93079ad958da2042229750a3e260d
This commit is contained in:
@@ -286,6 +286,7 @@ void WifiUI::refresh() {
|
||||
scanningLabel->setVisible(is_empty);
|
||||
if (is_empty) return;
|
||||
|
||||
const bool is_tethering_enabled = wifi->isTetheringEnabled();
|
||||
QList<Network> sortedNetworks = wifi->seenNetworks.values();
|
||||
std::sort(sortedNetworks.begin(), sortedNetworks.end(), compare_by_strength);
|
||||
|
||||
@@ -313,7 +314,7 @@ void WifiUI::refresh() {
|
||||
}
|
||||
|
||||
// Forget button
|
||||
if (wifi->isKnownConnection(network.ssid) && !wifi->isTetheringEnabled()) {
|
||||
if (wifi->isKnownConnection(network.ssid) && !is_tethering_enabled) {
|
||||
QPushButton *forgetBtn = new QPushButton(tr("FORGET"));
|
||||
forgetBtn->setObjectName("forgetBtn");
|
||||
QObject::connect(forgetBtn, &QPushButton::clicked, [=]() {
|
||||
|
||||
Reference in New Issue
Block a user