fix: 回退ensureDevicesLoaded,恢复原版'全离线才搜索'逻辑

This commit is contained in:
tian 2026-07-27 12:09:06 +08:00
parent bf5f0bbefe
commit dd83080ae2
2 changed files with 5 additions and 5 deletions

View File

@ -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.