Trim extra refresh logging

This commit is contained in:
Micha
2025-11-16 15:10:51 +01:00
parent d759a51ace
commit 22b2c632a9
2 changed files with 1 additions and 4 deletions

View File

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

View File

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