fix: 回退ensureDevicesLoaded,恢复原版'全离线才搜索'逻辑
This commit is contained in:
parent
bf5f0bbefe
commit
dd83080ae2
@ -942,15 +942,15 @@ func (u *UI) ensureDevicesLoaded() {
|
|||||||
}
|
}
|
||||||
devices := u.registry.GetDevices()
|
devices := u.registry.GetDevices()
|
||||||
if len(devices) > 0 {
|
if len(devices) > 0 {
|
||||||
// Check if any device is offline; trigger discovery to refresh
|
// Check if any device is online; if not, try discovery to refresh
|
||||||
hasOffline := false
|
hasOnline := false
|
||||||
for _, d := range devices {
|
for _, d := range devices {
|
||||||
if !d.Online {
|
if d.Online {
|
||||||
hasOffline = true
|
hasOnline = true
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if !hasOffline {
|
if hasOnline {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Binary file not shown.
Loading…
Reference in New Issue
Block a user