Merge Panama health hardening
This commit is contained in:
@@ -33,11 +33,16 @@ Singleton {
|
||||
}
|
||||
|
||||
readonly property var wiredDevice: {
|
||||
let fallback = null;
|
||||
for (const device of Networking.devices.values) {
|
||||
if (device.type === DeviceType.Wired)
|
||||
if (device.type !== DeviceType.Wired)
|
||||
continue;
|
||||
if (device.connected)
|
||||
return device;
|
||||
if (!fallback)
|
||||
fallback = device;
|
||||
}
|
||||
return null;
|
||||
return fallback;
|
||||
}
|
||||
|
||||
readonly property var adapter: Bluetooth.defaultAdapter
|
||||
|
||||
@@ -117,6 +117,8 @@ Singleton {
|
||||
}
|
||||
|
||||
function refresh(): bool {
|
||||
if (root.postRepairScanPending)
|
||||
return false;
|
||||
if (scanProcess.running || repairProcess.running) {
|
||||
root.queuedRefresh = true;
|
||||
return false;
|
||||
@@ -239,6 +241,8 @@ Singleton {
|
||||
const check = root.checks.find(candidate => candidate.id === id);
|
||||
if (!check || !check.action || check.action.kind !== "repair")
|
||||
return false;
|
||||
if (external && check.action.confirm)
|
||||
return false;
|
||||
|
||||
root.repairingId = id;
|
||||
root.lastError = "";
|
||||
|
||||
Reference in New Issue
Block a user