summaryrefslogtreecommitdiff
path: root/Hutch/Views
diff options
context:
space:
mode:
Diffstat (limited to 'Hutch/Views')
-rw-r--r--Hutch/Views/Builds/BuildDetailViewModel.swift4
-rw-r--r--Hutch/Views/Lookup/ContributionCalendarViewModel.swift12
-rw-r--r--Hutch/Views/Lookup/LookupView.swift4
-rw-r--r--Hutch/Views/Lookup/UserProfileViewModel.swift16
4 files changed, 0 insertions, 36 deletions
diff --git a/Hutch/Views/Builds/BuildDetailViewModel.swift b/Hutch/Views/Builds/BuildDetailViewModel.swift
index ec4d265..88b9e42 100644
--- a/Hutch/Views/Builds/BuildDetailViewModel.swift
+++ b/Hutch/Views/Builds/BuildDetailViewModel.swift
@@ -315,8 +315,6 @@ final class BuildDetailViewModel {
guard autoRefreshTask == nil else { return }
guard shouldAutoRefresh else { return }
- print("Build auto-refresh started")
-
autoRefreshTask = Task { [weak self] in
while !Task.isCancelled {
do {
@@ -336,7 +334,6 @@ final class BuildDetailViewModel {
autoRefreshTask.cancel()
self.autoRefreshTask = nil
- print("Build auto-refresh stopped")
}
private var shouldAutoRefresh: Bool {
@@ -352,7 +349,6 @@ final class BuildDetailViewModel {
return
}
- print("Build refresh tick")
await loadJob()
await loadBuildLog()
}
diff --git a/Hutch/Views/Lookup/ContributionCalendarViewModel.swift b/Hutch/Views/Lookup/ContributionCalendarViewModel.swift
index 1ff789d..acbae2d 100644
--- a/Hutch/Views/Lookup/ContributionCalendarViewModel.swift
+++ b/Hutch/Views/Lookup/ContributionCalendarViewModel.swift
@@ -116,8 +116,6 @@ final class ContributionCalendarViewModel {
isLoading = true
loadErrorMessage = nil
defer { isLoading = false }
- debugLog("load start actor=\(actor) endDate=\(selectedEndDate.formatted(date: .abbreviated, time: .omitted))")
-
let fetchedCalendar: ContributionCalendarResponse?
let fetchedStats: ContributionStatsResponse?
var errors: [any Error] = []
@@ -147,11 +145,6 @@ final class ContributionCalendarViewModel {
loadErrorMessage = errors.first?.userFacingMessage
}
- debugLog(
- "load complete actor=\(actor) endDate=\(selectedEndDate.formatted(date: .abbreviated, time: .omitted)) state=\(String(describing: displayState)) " +
- "calendarDays=\(calendar?.days.count ?? 0) totalEvents=\(stats?.totalEvents ?? 0) " +
- "indexingState=\(String(describing: effectiveIndexingState)) error=\(loadErrorMessage ?? "none")"
- )
}
func selectPreviousYear() async {
@@ -196,9 +189,4 @@ final class ContributionCalendarViewModel {
return normalizedStartDate...normalizedEndDate
}
- private func debugLog(_ message: String) {
-#if DEBUG
- print("[ContributionCalendarViewModel] \(message)")
-#endif
- }
}
diff --git a/Hutch/Views/Lookup/LookupView.swift b/Hutch/Views/Lookup/LookupView.swift
index e571140..e0adc6b 100644
--- a/Hutch/Views/Lookup/LookupView.swift
+++ b/Hutch/Views/Lookup/LookupView.swift
@@ -201,8 +201,6 @@ final class LookupViewModel {
}
"""
- lookupLogger.debug("Looking up user profile for username: \(username, privacy: .public)")
-
let result: Response
do {
result = try await client.execute(
@@ -225,8 +223,6 @@ final class LookupViewModel {
throw error
}
- lookupLogger.debug("User lookup succeeded for username: \(username, privacy: .public)")
-
return .user(result.user)
}
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
- }
}