From c0744a35891f89e50ab407a0b8557ce9d5c5e6cc Mon Sep 17 00:00:00 2001 From: Christian Cleberg Date: Sun, 12 Apr 2026 10:11:21 -0500 Subject: chore: clean up debug logging --- Hutch/Views/Lookup/UserProfileViewModel.swift | 16 ---------------- 1 file changed, 16 deletions(-) (limited to 'Hutch/Views/Lookup/UserProfileViewModel.swift') diff --git a/Hutch/Views/Lookup/UserProfileViewModel.swift b/Hutch/Views/Lookup/UserProfileViewModel.swift index 143cb6f..56c2852 100644 --- a/Hutch/Views/Lookup/UserProfileViewModel.swift +++ b/Hutch/Views/Lookup/UserProfileViewModel.swift @@ -85,8 +85,6 @@ final class UserProfileViewModel { defer { isLoadingContributions = false } let resolvedEndDate = Calendar.contributionCalendar.startOfDay(for: endDate ?? Date()) - debugLog("profile contributions start actor=\(actor) endDate=\(resolvedEndDate.formatted(date: .abbreviated, time: .omitted))") - do { async let contributionCalendar = statsService.fetchContributionCalendar(actor: actor, endingOn: resolvedEndDate) async let contributionStats = statsService.fetchContributionStats(actor: actor, endingOn: resolvedEndDate) @@ -96,17 +94,8 @@ final class UserProfileViewModel { if contributionDisplayState != .unavailable { contributionsError = nil } - debugLog( - "profile contributions complete actor=\(actor) endDate=\(resolvedEndDate.formatted(date: .abbreviated, time: .omitted)) " + - "state=\(String(describing: contributionDisplayState)) days=\(self.contributionCalendar?.days.count ?? 0) " + - "totalEvents=\(self.contributionStats?.totalEvents ?? 0) error=\(contributionsError ?? "none")" - ) } catch { contributionsError = error.userFacingMessage - debugLog( - "profile contributions failed actor=\(actor) endDate=\(resolvedEndDate.formatted(date: .abbreviated, time: .omitted)) " + - "error=\(error.localizedDescription) userFacing=\(contributionsError ?? "none")" - ) } } @@ -232,9 +221,4 @@ final class UserProfileViewModel { } } - private func debugLog(_ message: String) { -#if DEBUG - print("[UserProfileViewModel] \(message)") -#endif - } } -- cgit v1.2.3