prevent duplicate scan triggers

This commit is contained in:
notiant
2026-03-22 23:10:01 +01:00
committed by GitHub
parent 849bf16388
commit a624421047
2 changed files with 10 additions and 18 deletions
@@ -75,26 +75,17 @@ Item {
onEffectivelyVisibleChanged: {
if (effectivelyVisible) {
SystemStatService.registerComponent("wifi-subtab");
if (NetworkService.wifiEnabled && !NetworkService.scanningActive) {
if (NetworkService.wifiEnabled && !NetworkService.scanningActive && !showOnlyLists) {
NetworkService.scan();
NetworkService.refreshActiveWifiDetails();
}
} else {
SystemStatService.unregisterComponent("wifi-subtab");
NetworkService.scanningActive = false;
}
}
Component.onCompleted: {
if (effectivelyVisible) {
SystemStatService.registerComponent("wifi-subtab");
}
}
Component.onDestruction: {
SystemStatService.unregisterComponent("wifi-subtab");
if (effectivelyVisible) {
NetworkService.scanningActive = false;
}
}
// Actions