Trim extra refresh logging
This commit is contained in:
@@ -7,3 +7,4 @@
|
|||||||
- Added verbose logging in `MainView` to trace server loading, selection, and fetch/ping activity when the list appears empty.
|
- Added verbose logging in `MainView` to trace server loading, selection, and fetch/ping activity when the list appears empty.
|
||||||
- Switched `MainView` and `ServerFormView` to the version-aware API client (`APIFactory`/`APIv2_12`) for server summaries and introduced a shared `PingService`.
|
- Switched `MainView` and `ServerFormView` to the version-aware API client (`APIFactory`/`APIv2_12`) for server summaries and introduced a shared `PingService`.
|
||||||
- Detection now probes `meta.api_version` so future API versions are selected automatically, and the ping loop logs only failures to keep output quiet.
|
- Detection now probes `meta.api_version` so future API versions are selected automatically, and the ping loop logs only failures to keep output quiet.
|
||||||
|
- Further reduced MainView console noise by removing redundant refresh/onAppear logs.
|
||||||
|
|||||||
@@ -98,14 +98,11 @@ struct MainView: View {
|
|||||||
Button("Cancel", role: .cancel) {}
|
Button("Cancel", role: .cancel) {}
|
||||||
}
|
}
|
||||||
.onReceive(refreshTimer) { _ in
|
.onReceive(refreshTimer) { _ in
|
||||||
print("⏰ [MainView] Refresh timer fired with \(servers.count) servers")
|
|
||||||
for server in servers {
|
for server in servers {
|
||||||
print("⏰ [MainView] Triggering fetchServerInfo for: \(server.hostname)")
|
|
||||||
fetchServerInfo(for: server.id)
|
fetchServerInfo(for: server.id)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.onAppear {
|
.onAppear {
|
||||||
print("👀 [MainView] onAppear - servers in memory: \(servers.count)")
|
|
||||||
if let storedID = UserDefaults.standard.string(forKey: "selectedServerID"),
|
if let storedID = UserDefaults.standard.string(forKey: "selectedServerID"),
|
||||||
let uuid = UUID(uuidString: storedID),
|
let uuid = UUID(uuidString: storedID),
|
||||||
servers.contains(where: { $0.id == uuid }) {
|
servers.contains(where: { $0.id == uuid }) {
|
||||||
@@ -153,7 +150,6 @@ struct MainView: View {
|
|||||||
var updated = servers[index]
|
var updated = servers[index]
|
||||||
updated.info = info
|
updated.info = info
|
||||||
servers[index] = updated
|
servers[index] = updated
|
||||||
print("✅ [MainView] Updated server info for \(updated.hostname)")
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch {
|
} catch {
|
||||||
|
|||||||
Reference in New Issue
Block a user