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() 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.