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